%global stud_githash 0b88039 %global stud_user stud %global stud_group stud %global stud_homedir %{_localstatedir}/lib/stud %global stud_confdir %{_sysconfdir}/stud %global stud_datadir %{_datadir}/stud Name: stud Version: 0.3 Release: 1.20120814git%{?dist} Summary: The Scalable TLS Unwrapping Daemon License: BSD URL: https://github.com/bumptech/stud # downloaded from https://github.com/bumptech/stud/tarball/master Source0: bumptech-%{name}-%{version}-51-g%{stud_githash}.tar.gz Source1: %{name}.service Source2: %{name}.cfg Patch0: stud-0.3-fix-libev-include-path.patch BuildRequires: libev-devel BuildRequires: openssl-devel BuildRequires: systemd-units Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units %description stud is a network proxy that terminates TLS/SSL connections and forwards the unencrypted traffic to some backend. It is designed to handle tens of thousands of connections efficiently on multicore machines. stud has very few features -- it is designed to be paired with an intelligent backend like haproxy or nginx. %prep %setup -q -n bumptech-%{name}-%{stud_githash} %patch0 -p1 %build make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} PREFIX=%{_prefix} BINDIR=%{_sbindir} %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/stud.service %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{stud_confdir}/stud.cfg %{__install} -d -m 0755 %{buildroot}%{stud_homedir} %{__install} -d -m 0755 %{buildroot}%{stud_datadir} %pre groupadd -r %{stud_group} &>/dev/null ||: useradd -r -g %{stud_group} -s /sbin/nologin -d %{stud_homedir} %{stud_user} &>/dev/null ||: %post %systemd_post stud.service %preun %systemd_preun stud.service %postun %systemd_postun_with_restart stud.service %files %doc LICENSE README.md %dir %{stud_confdir} %dir %{stud_datadir} %config(noreplace) %{stud_confdir}/stud.cfg %{_unitdir}/stud.service %{_sbindir}/stud %{_mandir}/man8/stud.8* %attr(-,%{stud_user},%{stud_group}) %dir %{stud_homedir} %changelog * Tue Aug 14 2012 Ryan O'Hara - 0.3-1.20120814git - Initial build.