2011-04-26 15:09:12 +02:00
|
|
|
#
|
|
|
|
# spec file for package proftpd
|
|
|
|
#
|
2013-05-01 22:56:24 +02:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-04-26 15:09:12 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
Name: proftpd
|
|
|
|
Summary: Highly configurable GPL-licensed FTP server software
|
2011-12-12 16:19:37 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
2011-04-26 15:09:12 +02:00
|
|
|
# Please save your time and do not update to "rc" versions.
|
|
|
|
# We only accept updates for "STABLE" Versions
|
2013-05-01 22:56:24 +02:00
|
|
|
Version: 1.3.4c
|
2011-12-12 16:19:37 +01:00
|
|
|
Release: 0
|
2011-04-26 15:09:12 +02:00
|
|
|
Url: http://www.proftpd.org/
|
2012-08-14 13:47:07 +02:00
|
|
|
Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz
|
|
|
|
Source1: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.asc
|
|
|
|
Source11: %{name}.init
|
|
|
|
Source12: %{name}.passwd
|
2012-08-31 18:10:38 +02:00
|
|
|
Source13: %{name}.service
|
2012-11-02 17:30:44 +01:00
|
|
|
Source14: %{name}.conf.tmpfile
|
2012-12-20 12:39:35 +01:00
|
|
|
Source15: %{name}.keyring
|
2011-12-12 16:19:37 +01:00
|
|
|
#PATCH-FIX-openSUSE: pam, logrotate, xinet
|
2013-05-01 22:56:24 +02:00
|
|
|
Patch100: %{name}-dist.patch
|
2011-12-12 16:19:37 +01:00
|
|
|
#PATCH-FIX-openSUSE: provide a useful default config
|
2013-05-01 22:56:24 +02:00
|
|
|
Patch101: %{name}-basic.conf.patch
|
2011-12-12 16:19:37 +01:00
|
|
|
#PATCH-FIX: provide more info on usage ;)
|
2013-05-01 22:56:24 +02:00
|
|
|
Patch102: %{name}-ftpasswd.patch
|
2011-12-12 16:19:37 +01:00
|
|
|
#PATCH-FIX: fix strip
|
2013-05-01 22:56:24 +02:00
|
|
|
Patch103: %{name}-strip.patch
|
2012-08-14 13:47:07 +02:00
|
|
|
#PATCH-FIX-openSUSE: file-contains-date-and-time
|
|
|
|
Patch104: %{name}-no_BuildDate.patch
|
2011-04-26 15:09:12 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-12-20 12:39:35 +01:00
|
|
|
BuildRequires: gpg-offline
|
2011-04-29 13:21:05 +02:00
|
|
|
BuildRequires: krb5-devel
|
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libattr-devel
|
2012-08-14 13:47:07 +02:00
|
|
|
#BuildRequires: libmemcached-devel
|
2011-04-29 13:21:05 +02:00
|
|
|
BuildRequires: mysql-devel
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pam-devel
|
2011-04-26 15:09:12 +02:00
|
|
|
BuildRequires: pkg-config
|
2011-04-29 13:21:05 +02:00
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
BuildRequires: sqlite3-devel
|
|
|
|
BuildRequires: tcpd-devel
|
|
|
|
BuildRequires: unixODBC-devel
|
2011-04-26 15:09:12 +02:00
|
|
|
Requires: logrotate
|
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
%if 0%{?lang_package:1} > 0
|
|
|
|
Recommends: %{name}-lang
|
|
|
|
%endif
|
|
|
|
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?suse_version} >= 1210
|
|
|
|
BuildRequires: systemd
|
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%description
|
|
|
|
ProFTPD is a highly configurable FTP daemon for Unix and Unix-like
|
|
|
|
operating systems. See the README.ports file for more details about
|
|
|
|
the platforms on which ProFTPD in known or thought to build and run.
|
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
%{?lang_package}
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for ProFTPD
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains Development files for ProFTPD
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%package ldap
|
|
|
|
Summary: LDAP Module for ProFTPD
|
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description ldap
|
|
|
|
This is the LDAP Module for ProFTPD
|
|
|
|
|
|
|
|
%package mysql
|
|
|
|
Summary: MySQL Module for ProFTPD
|
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description mysql
|
|
|
|
This is the MySQL Module for ProFTPD
|
|
|
|
|
|
|
|
%package pgsql
|
|
|
|
Summary: PostgreSQL Module for ProFTPD
|
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description pgsql
|
|
|
|
This is the PostgreSQL Module for ProFTPD
|
|
|
|
|
|
|
|
%package radius
|
|
|
|
Summary: Radius Module for ProFTPD
|
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description radius
|
|
|
|
This is the Radius Module for ProFTPD
|
|
|
|
|
|
|
|
%package sqlite
|
|
|
|
Summary: SQLite Module for ProFTPD
|
|
|
|
Group: Productivity/Networking/Ftp/Servers
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description sqlite
|
|
|
|
This is the SQLite Module for ProFTPD
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for ProFTPD
|
|
|
|
Group: Documentation/HTML
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Here are Documentation for ProFTPD
|
|
|
|
|
|
|
|
%prep
|
2012-12-20 12:39:35 +01:00
|
|
|
%gpg_verify %{S:1}
|
2011-04-26 15:09:12 +02:00
|
|
|
%setup -q
|
|
|
|
%{__rm} README.AIX
|
2011-12-12 16:19:37 +01:00
|
|
|
%patch100
|
|
|
|
%patch101
|
|
|
|
%patch102
|
|
|
|
%patch103
|
2012-08-14 13:47:07 +02:00
|
|
|
%patch104
|
2011-04-26 15:09:12 +02:00
|
|
|
|
|
|
|
%build
|
2011-12-12 16:19:37 +01:00
|
|
|
PROFTPD_SHARED_MODS="$(for spec_mod in $(find contrib -name mod_\*.c); do echo "$(basename ${spec_mod%%.c})"; done | tr '\n' ':' | sed -e 's|:$||')"
|
2012-08-31 18:10:38 +02:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED"
|
2011-04-26 15:09:12 +02:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
2012-08-31 18:10:38 +02:00
|
|
|
%configure --disable-static --with-pic \
|
2011-04-26 15:09:12 +02:00
|
|
|
--bindir=%{_sbindir} \
|
|
|
|
--libexecdir=%{_libdir}/%{name} \
|
|
|
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
|
|
|
--localstatedir=%{_localstatedir}/run/%{name} \
|
|
|
|
--enable-sendfile \
|
|
|
|
--enable-ctrls \
|
|
|
|
--enable-dso \
|
2012-08-14 13:47:07 +02:00
|
|
|
--enable-facl \
|
|
|
|
--enable-ipv6 \
|
|
|
|
--enable-nls \
|
|
|
|
--enable-openssl \
|
|
|
|
--with-lastlog \
|
2011-04-26 15:09:12 +02:00
|
|
|
--with-includes="%{_includedir}/mysql:%{_includedir}/pgsql" \
|
2012-08-31 18:10:38 +02:00
|
|
|
--with-shared="${PROFTPD_SHARED_MODS}" \
|
|
|
|
--disable-ident \
|
|
|
|
--disable-strip
|
2011-04-26 15:09:12 +02:00
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
# --enable-memcache \
|
2011-04-26 15:09:12 +02:00
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall INSTALL_USER=`id -un` INSTALL_GROUP=`id -gn`
|
|
|
|
%{__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}
|
2012-08-14 13:47:07 +02:00
|
|
|
%{__install} -D -m 0755 %{S:11} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name}
|
2011-04-26 15:09:12 +02:00
|
|
|
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sbindir}/rc%{name}
|
|
|
|
#
|
|
|
|
%{__rm} -fv $RPM_BUILD_ROOT%{_libdir}/%{name}/*.{a,la}
|
|
|
|
|
|
|
|
# install ftpasswd
|
|
|
|
%{__install} -D -m 0755 contrib/ftpasswd $RPM_BUILD_ROOT%{_sbindir}/
|
|
|
|
|
|
|
|
# some needed dirs
|
|
|
|
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{conf.d,auth}
|
2012-08-14 13:47:07 +02:00
|
|
|
%{__install} -m 0644 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/auth/passwd
|
2011-04-26 15:09:12 +02:00
|
|
|
%{__install} -d -m 0750 $RPM_BUILD_ROOT/var/log/%{name}
|
|
|
|
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{__install} -D -m 0644 %{S:13} %{buildroot}%{_unitdir}/%{name}.service
|
2012-11-02 17:30:44 +01:00
|
|
|
# systemd need to create a tmp dir: /var/run/proftpd
|
|
|
|
%{__install} -D -m 0644 %{S:14} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
|
2012-08-31 18:10:38 +02:00
|
|
|
%endif
|
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
%find_lang %{name}
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%pre
|
|
|
|
# on `rpm -ivh` PARAM is 1
|
|
|
|
# on `rpm -Uvh` PARAM is 2
|
|
|
|
#if [ "$1" = "1" ]; then
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
2011-04-26 15:09:12 +02:00
|
|
|
|
|
|
|
%preun
|
|
|
|
# on `rpm -e` PARAM is 0
|
|
|
|
%stop_on_removal proftpd
|
|
|
|
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
%endif
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%post
|
|
|
|
# on `rpm -ivh` PARAM is 1
|
|
|
|
# on `rpm -Uvh` PARAM is 2
|
2011-11-18 16:37:01 +01:00
|
|
|
#if [ "$1" = "1" ]; then
|
|
|
|
# #%{__sed} -i "s,\(.*disable.*=\ \)no,\1yes," %{_sysconfdir}/xinetd.d/%{name}
|
|
|
|
# %{__sed} -i -e "s/@HOST@/$(hostname -s)/" %{_sysconfdir}/%{name}/%{name}.conf
|
|
|
|
#fi
|
2011-04-26 15:09:12 +02:00
|
|
|
%{fillup_and_insserv -f proftpd}
|
|
|
|
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
%endif
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%postun
|
|
|
|
# on `rpm -e` PARAM is 0
|
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
%{insserv_cleanup}
|
|
|
|
fi
|
|
|
|
%restart_on_update proftpd
|
|
|
|
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%endif
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%clean
|
|
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
%if 0%{?lang_package:1} > 0
|
|
|
|
%files lang -f %{name}.lang
|
|
|
|
%if 0%{?sles_version} == 11
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%dir %{_datadir}/locale/bg_BG
|
|
|
|
%dir %{_datadir}/locale/bg_BG/LC_MESSAGES
|
|
|
|
%dir %{_datadir}/locale/ja_JP
|
|
|
|
%dir %{_datadir}/locale/ja_JP/LC_MESSAGES
|
|
|
|
%dir %{_datadir}/locale/ko_KR
|
|
|
|
%dir %{_datadir}/locale/ko_KR/LC_MESSAGES
|
|
|
|
%endif
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%files
|
2012-08-14 13:47:07 +02:00
|
|
|
%else
|
|
|
|
%files -f %{name}.lang
|
|
|
|
%endif
|
2011-04-26 15:09:12 +02:00
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING CREDITS ChangeLog INSTALL NEWS README* RELEASE_NOTES
|
|
|
|
%doc contrib/README.*
|
|
|
|
#%doc contrib/xferstats.holger-preiss*
|
|
|
|
#%doc contrib/ftpasswd contrib/ftpquota
|
|
|
|
%doc sample-configurations/*.conf
|
|
|
|
%dir %attr(0755,root,root) %{_sysconfdir}/%{name}/
|
|
|
|
%dir %attr(0750,ftp,ftp) %{_sysconfdir}/%{name}/auth/
|
|
|
|
%config(noreplace) %attr(0644,root,ftp) %{_sysconfdir}/%{name}/auth/passwd
|
|
|
|
%dir %attr(0755,root,root) %{_sysconfdir}/%{name}/conf.d
|
|
|
|
%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/%{name}/%{name}.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
|
|
|
|
%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}
|
|
|
|
%ghost %{_localstatedir}/run/%{name}
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_mandir}/man?/*
|
|
|
|
%dir %attr(0755,root,root) %{_libdir}/%{name}/
|
|
|
|
%{_libdir}/%{name}/*.so
|
|
|
|
%exclude %{_libdir}/%{name}/mod_ldap.so
|
|
|
|
%exclude %{_libdir}/%{name}/mod_sql_mysql.so
|
|
|
|
%exclude %{_libdir}/%{name}/mod_sql_postgres.so
|
|
|
|
%exclude %{_libdir}/%{name}/mod_radius.so
|
|
|
|
%exclude %{_libdir}/%{name}/mod_sql_sqlite.so
|
2012-08-31 18:10:38 +02:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{_unitdir}/%{name}.service
|
2012-11-02 17:30:44 +01:00
|
|
|
%config %{_sysconfdir}/tmpfiles.d/%{name}.conf
|
2012-08-31 18:10:38 +02:00
|
|
|
%endif
|
2011-04-26 15:09:12 +02:00
|
|
|
|
2012-08-14 13:47:07 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_includedir}/%{name}
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
2011-04-26 15:09:12 +02:00
|
|
|
%files ldap
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/%{name}/mod_ldap.so
|
|
|
|
|
|
|
|
%files mysql
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/%{name}/mod_sql_mysql.so
|
|
|
|
|
|
|
|
%files pgsql
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/%{name}/mod_sql_postgres.so
|
|
|
|
|
|
|
|
%files radius
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/%{name}/mod_radius.so
|
|
|
|
|
|
|
|
%files sqlite
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/%{name}/mod_sql_sqlite.so
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc doc/*.html doc/contrib doc/howto doc/modules
|
|
|
|
|
|
|
|
%changelog
|