initial import
This commit is contained in:
84
proftpd/PKGBUILD
Normal file
84
proftpd/PKGBUILD
Normal file
@@ -0,0 +1,84 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=proftpd
|
||||
pkgver=1.3.7a
|
||||
_debver=$pkgver
|
||||
_debrel=12
|
||||
pkgrel=2
|
||||
pkgdesc="High-performance, scalable FTP server"
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.proftpd.org/'
|
||||
license=('GPL-2')
|
||||
depends=('postgresql-libs' 'libcap')
|
||||
makedepends=('quilt')
|
||||
backup=('etc/proftpd.conf')
|
||||
install=$pkgname.install
|
||||
options=('emptydirs')
|
||||
source=("https://deb.debian.org/debian/pool/main/p/proftpd-dfsg/proftpd-dfsg_${pkgver}+dfsg.orig.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/p/proftpd-dfsg/proftpd-dfsg_${_debver}+dfsg-${_debrel}+deb11u2.debian.tar.xz"
|
||||
"$pkgname.initd"
|
||||
"$pkgname.run"
|
||||
"$pkgname.logrotate")
|
||||
sha512sums=('ec230e5c2f9d0bdfb800c9f9fea0f978a6a23ba87428104bded9d48327645059a416db81185e80c12c8c6f2d3749a24129df9e86c33ce899cee8f6370adb9bd6'
|
||||
'f6febe2f09d908e12603f1224de3e8c7b608104d7131dc0f98b239dc88559281bd518c12d326d9ee30c0a81e9cb3fe167e71df5735f5d7b6844e7bc168133ce1'
|
||||
'cc09e01fab3e978ffb64d16dd0d4c991646c706046cba4669825067c8186db3199388bea129622dc2e92f3db8d3465489f7fe46a0e64f3f2e79c542e2d4bb6e0'
|
||||
'6472e06cfb728270f147551c49ed18c5830528d053788b08ca7061bd8de02fcc6c2d3d511c661fd6c301418a486d1a92856536fa61f562b05ff471e1d6470c01'
|
||||
'142f8ba096844eb48883cdd3890fa3c0c4c8f73f7ce4f2acd5fb742053f8a3605b3f6ca5d5ab6c62c673d76eb60885d796af55bd7b53950794c4e7e2837973b8')
|
||||
|
||||
prepare() {
|
||||
mv "${pkgname}-dfsg-${pkgver}+dfsg" "${pkgname}-${pkgver}"
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply
|
||||
rm -v debian/patches/autotools || true
|
||||
rm -v debian/patches/change_pam_name || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-pam \
|
||||
--disable-redis \
|
||||
--with-modules=mod_sftp:mod_quotatab:mod_quotatab_sql:mod_quotatab_file:mod_tls:mod_tls_shmcache:mod_ldap:mod_sql:mod_sql_postgres:mod_facl:mod_dynmasq \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/run/proftpd \
|
||||
--enable-ctrls \
|
||||
--enable-ipv6 \
|
||||
--with-includes=/usr/include/postgresql \
|
||||
--with-libraries=/usr/lib/postgresql \
|
||||
--enable-nls \
|
||||
--enable-facl
|
||||
|
||||
make CFLAGS="$CFLAGS -fcommon"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
sed -i 's|nogroup|nobody|g' "${pkgdir}/etc/proftpd.conf"
|
||||
|
||||
install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname"
|
||||
|
||||
install -Dm644 ${srcdir}/$pkgname.logrotate "${pkgdir}/etc/logrotate.d/$pkgname"
|
||||
install -Dm755 ${srcdir}/$pkgname.initd "${pkgdir}/etc/init.d/$pkgname"
|
||||
install -Dm755 ${srcdir}/$pkgname.run "${pkgdir}/etc/sv/$pkgname/run"
|
||||
install -Dm755 contrib/xferstats.holger-preiss "${pkgdir}/usr/bin/ftpstats"
|
||||
install -d "${pkgdir}/var/lib/ftp"
|
||||
|
||||
# cleanup
|
||||
rmdir "${pkgdir}"/run/{proftpd,}
|
||||
}
|
||||
35
proftpd/proftpd.initd
Normal file
35
proftpd/proftpd.initd
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
name="ProFTPD"
|
||||
description="ProFTPD FTP Server"
|
||||
|
||||
pidfile="/run/proftpd/proftpd.pid"
|
||||
command="/usr/sbin/proftpd"
|
||||
command_args="-n"
|
||||
command_background="yes"
|
||||
required_files="/etc/proftpd.conf"
|
||||
extra_commands="checkconfig"
|
||||
extra_started_commands="reload"
|
||||
description_checkconfig="Check configuration"
|
||||
description_reload="Reload configuration"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use logger dns
|
||||
after firewall
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
$command -t
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory ${pidfile%/*}
|
||||
checkconfig >/dev/null 2>&1
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ${name:-$RC_SVCNAME}"
|
||||
checkconfig >/dev/null 2>&1 && start-stop-daemon --signal HUP --pidfile $pidfile
|
||||
eend $?
|
||||
}
|
||||
24
proftpd/proftpd.install
Normal file
24
proftpd/proftpd.install
Normal file
@@ -0,0 +1,24 @@
|
||||
post_install() {
|
||||
if ! getent group proftpd &>/dev/null; then
|
||||
groupadd -r proftpd >& /dev/null
|
||||
fi
|
||||
if ! getent passwd proftpd &>/dev/null; then
|
||||
useradd -r -d /var/lib/ftp -g proftpd -s /bin/false proftpd
|
||||
usermod -aG ftp proftpd
|
||||
fi
|
||||
|
||||
chown proftpd:proftpd /var/lib/ftp
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if getent passwd proftpd &>/dev/null; then
|
||||
userdel proftpd >/dev/null
|
||||
fi
|
||||
if getent group proftpd &>/dev/null; then
|
||||
groupdel proftpd >/dev/null
|
||||
fi
|
||||
}
|
||||
9
proftpd/proftpd.logrotate
Normal file
9
proftpd/proftpd.logrotate
Normal file
@@ -0,0 +1,9 @@
|
||||
/var/log/proftpd/*.log /var/log/xferlog {
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/etc/init.d/proftpd --ifstarted --quiet reload
|
||||
endscript
|
||||
}
|
||||
3
proftpd/proftpd.run
Normal file
3
proftpd/proftpd.run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh -e
|
||||
/usr/sbin/proftpd -n
|
||||
exec pause 2>&1
|
||||
Reference in New Issue
Block a user