# Tests by default. No tests: rpm -ba --define 'dotests 0' *.spec %{!?dotests: %define dotests 1} %global pkidir %{_datadir}/ssl Summary: Flexible, stable and highly-configurable FTP server Name: proftpd Version: 1.3.6 Release: 1 License: GPLv2+ Group: System Environment/Daemons URL: http://www.proftpd.org/ Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz Source1: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.asc Source2: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.md5 Source3: proftpd.conf Source4: proftpd.aix.init Source5: proftpd-welcome.msg Source6: proftpd.logrotate Source7: proftpd.sysconfig Patch0: %{name}-1.3.6-aix.patch Patch1: %{name}-mkdtemp-aix.patch Patch2: proftpd1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkg-config, make BuildRequires: gcc >= 6.3.0-1 #BuildRequires: GeoIP-devel >= 1.5.1-1 BuildRequires: gettext BuildRequires: libiconv >= 1.14 BuildRequires: openldap-devel >= 2.4.44-0.1 BuildRequires: sqlite-devel >= 3.20.1-1 BuildRequires: zlib-devel >= 1.2.3-7 Requires: gettext Requires: libgcc >= 6.3.0-1 Requires: libiconv >= 1.14 Requires: zlib >= 1.2.3-7 Provides: ftpserver %description ProFTPD is an enhanced FTP server with a focus toward simplicity, security, and ease of configuration. It features a very Apache-like configuration syntax, and a highly customizable server infrastructure, including support for multiple 'virtual' FTP servers, anonymous FTP, and permission-based directory visibility. This package defaults to the standalone behavior of ProFTPD, but all the needed scripts to have it run by xinetd instead are included. %package ldap Summary: Module to add LDAP support to the ProFTPD FTP server Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} Requires: openldap >= 2.4.44-0.1 %description ldap Module to add LDAP support to the ProFTPD FTP server. %package sqlite Summary: Module to add SQLite support to the ProFTPD FTP server Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} Requires: sqlite >= 1.0.2l-1 %description sqlite Module to add SQLite support to the ProFTPD FTP server. %package GeoIP Summary: Module to add GeoIP support to the ProFTPD FTP server Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} Requires: GeoIP >= 1.5.1-1 %description GeoIP Module to add GeoIP support to the ProFTPD FTP server. %prep export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 %patch1 %patch2 -p1 # avoid documentation name conflicts mv contrib/README contrib/README.contrib # set up directory names in config file sed -e 's#@PKIDIR@#%{pkidir}#g' %{SOURCE3} > proftpd.conf # avoid docfile dependencies chmod -x contrib/xferstats.holger-preiss %build export CC=gcc export CFLAGS="-D_LARGE_FILES -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O2 -D_USE_IRS -I/opt/freeware/include -I../contrib" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" # modules to be built as DSO's (excluding mod_ifsession, always specified last) SMOD1=mod_sql:mod_sql_passwd:mod_sql_sqlite SMOD2=mod_quotatab:mod_quotatab_file:mod_quotatab_ldap:mod_quotatab_radius SMOD3=mod_ldap:mod_ban:mod_ctrls_admin:mod_facl:mod_load #SMOD4=mod_radius:mod_ratio:mod_rewrite:mod_site_misc:mod_exec:mod_shaper:mod_geoip SMOD4=mod_radius:mod_ratio:mod_rewrite:mod_site_misc:mod_exec:mod_shaper SMOD5=mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_copy:mod_deflate:mod_ifversion:mod_qos SMOD6=mod_sftp:mod_tls_shmcache install_user=`id -u` install_group=`id -g` ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --sysconfdir=/etc \ --libexecdir=%{_libexecdir}/%{name} \ --localstatedir=/var/run/%{name} \ --enable-shared --disable-static \ --enable-authpam \ --enable-cap \ --enable-ctrls \ --enable-facl \ --enable-dso \ --enable-nls \ --disable-ncurses \ --enable-ipv6 \ --enable-openssl \ --enable-tests \ --with-libraries=%{_libdir} \ --with-modules=mod_readme:mod_auth_pam:mod_tls \ --with-shared=${SMOD1}:${SMOD2}:${SMOD3}:${SMOD4}:${SMOD5}:${SMOD6}:mod_ifsession gmake %{?_smp_mflags} # To run the testsuites ,we need to install check package if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/rm -f ${RPM_BUILD_ROOT}%{_sbindir}/in.%{name} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : /usr/bin/strip ${RPM_BUILD_ROOT}%{_sbindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libexecdir}/%{name} rm -f *.la for f in *.a ; do /usr/bin/ar -X32 -x ${f} rm -f ${f} done ) mkdir -p ${RPM_BUILD_ROOT}/etc cp %{name}.conf ${RPM_BUILD_ROOT}/etc chmod 0640 ${RPM_BUILD_ROOT}/etc/%{name}.conf # create the /etc/rc.d/init.d/ scripts and symlinks mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d/ cp %{SOURCE4} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{name} chmod 0755 ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{name} mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/ mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/ ln -sf '../init.d/proftpd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/S%{name} ln -sf '../init.d/proftpd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/K%{name} ln -sf '../init.d/proftpd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/S%{name} ln -sf '../init.d/proftpd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/K%{name} mkdir -p ${RPM_BUILD_ROOT}/var/ftp cp %{SOURCE5} ${RPM_BUILD_ROOT}/var/ftp/welcome.msg chmod 0644 ${RPM_BUILD_ROOT}/var/ftp/welcome.msg # install log rotation stuff mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/etc/logrotate.d cp %{SOURCE6} ${RPM_BUILD_ROOT}%{_prefix}/etc/logrotate.d/%{name} chmod 0644 ${RPM_BUILD_ROOT}%{_prefix}/etc/logrotate.d/%{name} mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig cp %{SOURCE7} ${RPM_BUILD_ROOT}/etc/sysconfig/%{name} chmod 0644 ${RPM_BUILD_ROOT}/etc/sysconfig/%{name} mkdir -p ${RPM_BUILD_ROOT}/var/ftp/pub mkdir -p ${RPM_BUILD_ROOT}/var/ftp/uploads mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name} /bin/touch ${RPM_BUILD_ROOT}/etc/ftpusers %post if [ $1 -eq 1 ] ; then IFS=":" %{__cat} /etc/passwd | \ while { read username nu nu gid nu nu nu nu; }; do \ if [ $gid -lt 100 -a "$username" != "ftp" ] ; then echo $username >> /etc/ftpusers fi done fi %preun if [ $1 -eq 0 ] ; then /etc/rc.d/init.d/%{name} stop &>/dev/null || : if [ -d /var/run/%{name} ] ; then cd /var/run/%{name} rm -rf * &>/dev/null fi fi %postun if [ $1 -ge 1 ]; then /etc/rc.d/init.d/%{name} condrestart &>/dev/null || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc COPYING CREDITS ChangeLog NEWS README.md %doc README.DSO README.modules README.IPv6 README.PAM %doc README.capabilities README.classes README.controls README.facl %doc contrib/README.contrib contrib/README.ratio %doc doc/* sample-configurations/ contrib/xferstats.holger-preiss %dir /var/ftp/ %dir /var/ftp/pub/ %dir /var/run/%{name}/ %config(noreplace) /var/ftp/welcome.msg %config(noreplace) /etc/blacklist.dat %config(noreplace) /etc/dhparams.pem %config(noreplace) /etc/ftpusers %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) /etc/%{name}.conf %config(noreplace) /etc/sysconfig/%{name} /etc/rc.d/init.d/%{name} /etc/rc.d/rc2.d/S%{name} /etc/rc.d/rc2.d/K%{name} /etc/rc.d/rc3.d/S%{name} /etc/rc.d/rc3.d/K%{name} %{_bindir}/* %{_sbindir}/* %{_includedir}/%{name} %{_mandir}/man?/* %{_libdir}/pkgconfig/%{name}.pc %dir %{_libexecdir}/proftpd/ %{_libexecdir}/%{name}/mod_ban.so %{_libexecdir}/%{name}/mod_copy.so %{_libexecdir}/%{name}/mod_ctrls_admin.so %{_libexecdir}/%{name}/mod_deflate.so %{_libexecdir}/%{name}/mod_exec.so %{_libexecdir}/%{name}/mod_facl.so %{_libexecdir}/%{name}/mod_ifsession.so %{_libexecdir}/%{name}/mod_ifversion.so %{_libexecdir}/%{name}/mod_load.so %{_libexecdir}/%{name}/mod_qos.so %{_libexecdir}/%{name}/mod_quotatab.so %{_libexecdir}/%{name}/mod_quotatab_file.so %{_libexecdir}/%{name}/mod_quotatab_radius.so %{_libexecdir}/%{name}/mod_radius.so %{_libexecdir}/%{name}/mod_ratio.so %{_libexecdir}/%{name}/mod_rewrite.so %{_libexecdir}/%{name}/mod_sftp.so %{_libexecdir}/%{name}/mod_shaper.so %{_libexecdir}/%{name}/mod_site_misc.so %{_libexecdir}/%{name}/mod_sql.so %{_libexecdir}/%{name}/mod_sql_passwd.so %{_libexecdir}/%{name}/mod_tls_shmcache.so %{_libexecdir}/%{name}/mod_wrap2.so %{_libexecdir}/%{name}/mod_wrap2_file.so %{_libexecdir}/%{name}/mod_wrap2_sql.so %{_datadir}/locale/*/*/* %attr(331,ftp,ftp) %dir /var/ftp/uploads/ %attr(750,root,system) %dir /var/log/%{name}/ %files ldap %defattr(-,root,system,-) %doc README.LDAP contrib/mod_quotatab_ldap.ldif contrib/mod_quotatab_ldap.schema %{_libexecdir}/%{name}/mod_ldap.so %{_libexecdir}/%{name}/mod_quotatab_ldap.so %files sqlite %defattr(-,root,system,-) %{_libexecdir}/%{name}/mod_sql_sqlite.so %changelog * Fri May 03 2019 Harshita Jain -1.3.6-1 - Update to version 1.3.6 for AIX Toolbox * Thu Aug 10 2017 Michael Perzl - 1.3.6-1 - updated to version 1.3.6 * Thu Aug 10 2017 Michael Perzl - 1.3.5e-1 - updated to version 1.3.5e * Thu Aug 10 2017 Michael Perzl - 1.3.5d-1 - updated to version 1.3.5d * Thu Aug 10 2017 Michael Perzl - 1.3.5c-1 - updated to version 1.3.5c * Wed Nov 16 2016 Michael Perzl - 1.3.5b-2 - recompiled against latest versions * Thu Jul 07 2016 Michael Perzl - 1.3.5b-1 - updated to version 1.3.5b * Thu Jul 07 2016 Michael Perzl - 1.3.5a-1 - updated to version 1.3.5a * Fri Mar 04 2016 Michael Perzl - 1.3.5-2 - recompiled against latest versions * Wed May 28 2014 Michael Perzl - 1.3.5-1 - updated to version 1.3.5 * Wed May 28 2014 Michael Perzl - 1.3.4e-1 - updated to version 1.3.4e * Mon Jun 24 2013 Michael Perzl - 1.3.4d-1 - updated to version 1.3.4d * Fri May 03 2013 Michael Perzl - 1.3.4c-1 - updated to version 1.3.4c * Thu Aug 09 2012 Michael Perzl - 1.3.4b-1 - updated to version 1.3.4b * Mon Jan 30 2012 Michael Perzl - 1.3.4a-1 - updated to version 1.3.4a * Thu Nov 17 2011 Michael Perzl - 1.3.3g-1 - first version for AIX V5.1 and higher