Browse Source

stunnel-5.25-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9789 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 9 years ago
parent
commit
5c060366b5
1 changed files with 42 additions and 14 deletions
  1. 42 14
      s/stunnel/stunnel-vl.spec

+ 42 - 14
s/stunnel/stunnel-vl.spec

@@ -1,4 +1,4 @@
-%define ver 4.54
+%define ver 5.25
 %define rel 1
 
 Summary: An SSL-encrypting socket wrapper
@@ -15,8 +15,9 @@ Source3: sfinger.xinetd
 Source4: stunnel-sfinger.conf
 Source5: pop3-redirect.xinetd
 Source6: stunnel-pop3s-client.conf
-Patch0: stunnel-4-authpriv.patch
-Patch1: stunnel-4-sample.patch
+Source100: stunnel.init
+Patch0: stunnel-5.25-authpriv.patch
+Patch1: stunnel-5.25-config.patch
 Buildroot: %{_tmppath}/stunnel-root
 # util-linux is needed for rename
 BuildRequires: openssl-devel
@@ -36,10 +37,7 @@ in conjunction with imapd to create an SSL secure IMAP server.
 %prep
 %setup -q
 %patch0 -p1 -b .authpriv
-%patch1 -p1 -b .sample
-
-iconv -f iso-8859-1 -t utf-8 < doc/stunnel.fr.8 > doc/stunnel.fr.8_
-mv doc/stunnel.fr.8_ doc/stunnel.fr.8
+%patch1 -p1 -b .config
 
 %build
 CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
@@ -53,23 +51,45 @@ make LDADD="-pie -Wl,-z,defs,-z,relro,-z,now"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stunnel
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/conf.d
 touch $RPM_BUILD_ROOT%{_sysconfdir}/stunnel/stunnel.pem
 make install DESTDIR=$RPM_BUILD_ROOT
 # Move the translated man pages to the right subdirectories, and strip off the
 # language suffixes.
-for lang in fr pl ; do
+for lang in pl ; do
 	mkdir -p $RPM_BUILD_ROOT/%{_mandir}/${lang}/man8
 	mv $RPM_BUILD_ROOT/%{_mandir}/man8/*.${lang}.8* $RPM_BUILD_ROOT/%{_mandir}/${lang}/man8/
 	rename ".${lang}" "" $RPM_BUILD_ROOT/%{_mandir}/${lang}/man8/*
 done
 
-mkdir srpm-docs
+install -d -m755 %{buildroot}%{_initdir}
+install -m755 %{SOURCE100} %{buildroot}%{_initdir}/stunnel
+
+install -d m755 %{buildroot}%{_sysconfdir}/sysconfig
+cat <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/stunnel
+ENABLED=0
+EOF
+
+mkdir -p srpm-docs
 cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} srpm-docs
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+getent group stunnel >/dev/null || groupadd -r stunnel
+getent passwd stunnel >/dev/null || \
+useradd -r -g stunnel -d /dev/null -s /sbin/nologin \
+  -c "stunnel service account" stunnel
+
+%post
+/sbin/chkconfig --add stunnel
+
+%preun
+if [ $1 -eq 0 ]; then
+  /sbin/chkconfig --del stunnel
+fi
+
 %files
 %defattr(-,root,root)
 %doc AUTHORS BUGS ChangeLog COPY* CREDITS PORTS README TODO
@@ -78,17 +98,25 @@ rm -rf $RPM_BUILD_ROOT
 %lang(en) %doc doc/en/*
 %lang(po) %doc doc/pl/*
 %{_bindir}/stunnel
+%{_initdir}/stunnel
 %exclude %{_bindir}/stunnel3
 %exclude %{_datadir}/doc/stunnel
 %{_libdir}/stunnel
 %exclude %{_libdir}/stunnel/libstunnel.la
 %{_mandir}/man8/stunnel.8*
-%lang(fr) %{_mandir}/fr/man8/stunnel.8*
 %lang(pl) %{_mandir}/pl/man8/stunnel.8*
 %dir %{_sysconfdir}/%{name}
-%exclude %{_sysconfdir}/stunnel/*
+%dir %{_sysconfdir}/%{name}/conf.d
+%exclude %{_sysconfdir}/stunnel/stunnel.conf-sample
+%exclude %{_sysconfdir}/stunnel/stunnel.pem
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
 
 %changelog
+* Fri Nov  6 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.25-1
+- new upstream release.
+- fixed dates in %%changelog.
+- updated all patches.
+
 * Tue Jan 15 2013 IWAI, Masaharu <iwai@alib.jp> 4.54-1
 - initial build for Vine Linux
 
@@ -162,7 +190,7 @@ rm -rf $RPM_BUILD_ROOT
 - New upstream realease 4.30
 - Updated authpriv and sample patches for the new release
 
-* Tue Dec 09 2009 Avesh Agarwal <avagarwa@redhat.com> - 4.29-1
+* Wed Dec 09 2009 Avesh Agarwal <avagarwa@redhat.com> - 4.29-1
 - New upstream realease 4.29
 - Updated authpriv and sample patches for the new release
 - Modified spec file to include dist tag
@@ -448,7 +476,7 @@ rm -rf $RPM_BUILD_ROOT
 * Sat Oct 30 1999 Bernhard Rosenkraenzer <bero@redhat.com>
 - Modify spec file to match Red Hat standards
 
-* Fri Aug 12 1999 Damien Miller <damien@ibs.com.au>
+* Thu Aug 12 1999 Damien Miller <damien@ibs.com.au>
 - Updated to 3.4a
 - Patched for OpenSSL 0.9.4
 - Cleaned up files section