Michal Vyskocil 2012-02-21 10:52:18 +00:00 committed by Git OBS Bridge
parent e5b3faff0a
commit f9dd88708e
2 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 21 10:51:51 UTC 2012 - mvyskocil@suse.cz
- follow Systemd Packaging guidelines
http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 15 16:41:15 UTC 2012 - mvyskocil@suse.cz Wed Feb 15 16:41:15 UTC 2012 - mvyskocil@suse.cz

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: vsftpd Name: vsftpd
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: pam-devel BuildRequires: pam-devel
@ -23,6 +24,9 @@ BuildRequires: libcap
%else %else
BuildRequires: libcap-devel BuildRequires: libcap-devel
%endif %endif
%if 0%{?suse_version} > 1140
BuildRequires: systemd
%endif
Version: 2.3.5 Version: 2.3.5
Release: 0 Release: 0
Summary: Very Secure FTP Daemon - Written from Scratch Summary: Very Secure FTP Daemon - Written from Scratch
@ -48,6 +52,7 @@ Patch9: vsftpd-2.3.5-conf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: ftp-server Provides: ftp-server
PreReq: %insserv_prereq /usr/sbin/useradd PreReq: %insserv_prereq /usr/sbin/useradd
%{?systemd_requires}
Requires: logrotate Requires: logrotate
%description %description
@ -93,20 +98,34 @@ install -d $RPM_BUILD_ROOT/%_datadir/omc/svcinfo.d/
install -D -m 644 %SOURCE5 $RPM_BUILD_ROOT/%_datadir/omc/svcinfo.d/ install -D -m 644 %SOURCE5 $RPM_BUILD_ROOT/%_datadir/omc/svcinfo.d/
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
install -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} install -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
install -D -m 0644 %SOURCE7 %{buildroot}/lib/systemd/system/vsftpd.service %if 0%{?suse_version} > 1140
install -D -m 0644 %SOURCE7 %{buildroot}/%{name}.service
%endif
%pre %pre
/usr/sbin/useradd -r -o -g nogroup -s /bin/false -c "Secure FTP User" -d /var/lib/empty ftpsecure 2> /dev/null || : /usr/sbin/useradd -r -o -g nogroup -s /bin/false -c "Secure FTP User" -d /var/lib/empty ftpsecure 2> /dev/null || :
%if 0%{?suse_version} > 1140
%service_add_pre %{name}.service
%endif
%preun %preun
%stop_on_removal %name %stop_on_removal %name
%if 0%{?suse_version} > 1140
%service_del_preun %{name}.service
%endif
%post %post
%{fillup_and_insserv -f %{name}} %{fillup_and_insserv -f %{name}}
%if 0%{?suse_version} > 1140
%service_add_post %{name}.service
%endif
%postun %postun
%insserv_cleanup %insserv_cleanup
%restart_on_update %name %restart_on_update %name
%if 0%{?suse_version} > 1140
%service_del_postun %{name}.service
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT