forked from pool/proftpd
Accepting request 450450 from home:computersalat:devel:network
update to 1.3.5c OBS-URL: https://build.opensuse.org/request/show/450450 OBS-URL: https://build.opensuse.org/package/show/network/proftpd?expand=0&rev=40
This commit is contained in:
committed by
Git OBS Bridge
parent
b4c3f7e42b
commit
80e30b5209
35
proftpd.spec
35
proftpd.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package proftpd
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -22,7 +22,7 @@ License: GPL-2.0+
|
||||
Group: Productivity/Networking/Ftp/Servers
|
||||
# Please save your time and do not update to "rc" versions.
|
||||
# We only accept updates for "STABLE" Versions
|
||||
Version: 1.3.5b
|
||||
Version: 1.3.5c
|
||||
Release: 0
|
||||
Url: http://www.proftpd.org/
|
||||
Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz
|
||||
@@ -68,6 +68,8 @@ Recommends: %{name}-lang
|
||||
BuildRequires: systemd
|
||||
%{?systemd_requires}
|
||||
%define has_systemd 1
|
||||
%else
|
||||
Requires(pre): %insserv_prereq
|
||||
%endif
|
||||
|
||||
%description
|
||||
@@ -178,8 +180,6 @@ export CXXFLAGS="$CFLAGS"
|
||||
%{__install} -D -m 0644 contrib/dist/rpm/ftp.pamd $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/%{name}
|
||||
%{__install} -D -m 0644 contrib/dist/rpm/xinetd $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name}
|
||||
%{__install} -D -m 0644 contrib/dist/rpm/%{name}.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
|
||||
%{__install} -D -m 0755 %{S:11} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
|
||||
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
|
||||
#
|
||||
%{__rm} -fv $RPM_BUILD_ROOT%{_libdir}/%{name}/*.{a,la}
|
||||
|
||||
@@ -191,33 +191,32 @@ export CXXFLAGS="$CFLAGS"
|
||||
%{__install} -m 0440 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/auth/passwd
|
||||
%{__install} -d -m 0750 $RPM_BUILD_ROOT/var/log/%{name}
|
||||
|
||||
# systemd vs SysVinit
|
||||
%if 0%{?has_systemd}
|
||||
%{__install} -D -m 0644 %{S:13} %{buildroot}%{_unitdir}/%{name}.service
|
||||
%{__ln_s} -f %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
|
||||
# systemd need to create a tmp dir: /run/proftpd
|
||||
%{__install} -D -m 0644 %{S:14} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||
%else #SysVinit
|
||||
%{__install} -D -m 0755 %{S:11} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
|
||||
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%pre
|
||||
# on `rpm -ivh` PARAM is 1
|
||||
# on `rpm -Uvh` PARAM is 2
|
||||
#if [ "$1" = "1" ]; then
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_pre %{name}.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
# on `rpm -e` PARAM is 0
|
||||
%stop_on_removal proftpd
|
||||
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_preun %{name}.service
|
||||
%else
|
||||
%stop_on_removal %{name}
|
||||
%endif
|
||||
|
||||
%post
|
||||
# on `rpm -ivh` PARAM is 1
|
||||
# on `rpm -Uvh` PARAM is 2
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_post %{name}.service
|
||||
/usr/bin/systemd-tmpfiles --create %{name}.conf || :
|
||||
@@ -227,14 +226,11 @@ export CXXFLAGS="$CFLAGS"
|
||||
%endif
|
||||
|
||||
%postun
|
||||
# on `rpm -e` PARAM is 0
|
||||
if [ "$1" = "0" ]; then
|
||||
%{insserv_cleanup}
|
||||
fi
|
||||
%restart_on_update proftpd
|
||||
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_postun %{name}.service
|
||||
%else
|
||||
%restart_on_update %{name}
|
||||
%{insserv_cleanup}
|
||||
%endif
|
||||
|
||||
%if 0%{?lang_package:1} > 0
|
||||
@@ -270,7 +266,6 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/xinetd.d/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/blacklist.dat
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/dhparams.pem
|
||||
%{_sysconfdir}/init.d/%{name}
|
||||
%dir %attr(0750,ftp,ftp) %{_localstatedir}/log/%{name}
|
||||
%{_sbindir}/*
|
||||
%{_mandir}/man?/*
|
||||
@@ -285,6 +280,8 @@ fi
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||
%ghost %dir /run/%{name}
|
||||
%else
|
||||
%{_sysconfdir}/init.d/%{name}
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
|
Reference in New Issue
Block a user