diff --git a/.gitignore b/.gitignore index e69de29..bbf204f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/sstp-client-1.0.9.tar.gz diff --git a/sources b/sources index e69de29..d3e3151 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +40f1d1b1596b4f1817ec903f58b2780c sstp-client-1.0.9.tar.gz diff --git a/sstp-client.spec b/sstp-client.spec new file mode 100644 index 0000000..17cdd58 --- /dev/null +++ b/sstp-client.spec @@ -0,0 +1,87 @@ +%global _hardened_build 1 +%global __provides_exclude ^sstp-pppd-plugin\\.so$ +%global clientname sstpc + +Name: sstp-client +Version: 1.0.9 +Release: 4%{?dist} +Summary: Secure Socket Tunneling Protocol (SSTP) Client +License: GPLv2+ +Url: http://sstp-client.sourceforge.net +Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz +BuildRequires: libevent-devel +BuildRequires: libtool +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: ppp-devel +Requires: openssl +Requires: ppp +Requires(pre): shadow-utils + +%description +This is a client for the Secure Socket Tunneling Protocol, SSTP. It can be +used to establish a SSTP connection to a Windows Server. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%setup -q + +%build +%configure --disable-static \ + --with-runtime-dir="%{_localstatedir}/run/%{clientname}" +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool +make CFLAGS="%{optflags}" %{?_smp_mflags} V=1 + +%install +make install DESTDIR=%{buildroot} +rm -rf %{buildroot}%{_datadir}/doc +find %{buildroot} -name '*.la' -exec rm -f {} ';' + +%pre +getent group %{clientname} >/dev/null || groupadd -r %{clientname} +getent passwd %{clientname} >/dev/null || \ + useradd -r -g %{clientname} \ + -d %{_localstatedir}/run/%{clientname} \ + -s /sbin/nologin \ + -c "Secure Socket Tunneling Protocol (SSTP) Client" %{clientname} +exit 0 + +%post -p /sbin/ldconfig + +%postun +/sbin/ldconfig -p +rm -rf %{_localstatedir}/run/%{clientname} + +%files +%doc AUTHORS ChangeLog COPYING README TODO USING *.example +%{_sbindir}/%{clientname} +%{_libdir}/libsstp_api-0.so +%{_libdir}/pppd/2.4.5/sstp-pppd-plugin.so +%{_mandir}/man8/%{clientname}.8* + +%files devel +%{_includedir}/sstp-client/ +%{_libdir}/libsstp_api.so +%{_libdir}/pkgconfig/sstp-client-1.0.pc + +%changelog +* Thu Aug 01 2013 Christopher Meng - 1.0.9-4 +- Fix library issue. + +* Fri Jul 26 2013 Christopher Meng - 1.0.9-3 +- Filter out the private library. + +* Tue Jul 23 2013 Christopher Meng - 1.0.9-2 +- Remove Rpath. + +* Sun Feb 03 2013 Christopher Meng - 1.0.9-1 +- Initial Package.