bftpd: patch Makefile to respect sysconfdir, localstatedir

This commit is contained in:
John McQuah 2023-09-20 12:35:06 +00:00
parent 3423897888
commit dbcff4fdc8
4 changed files with 25 additions and 28 deletions

View File

@ -13,5 +13,3 @@ drwxr-xr-x root/root usr/share/man/man8/
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/log/
-rw-r--r-- root/root var/log/bftpd.log (EMPTY)
drwxr-xr-x root/root var/run/
drwxr-xr-x root/root var/run/bftpd/

View File

@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF31fp9c2P8r1fHrfKk//3yR5a0W5Ha2lHqUSqOXe3dsaMQbWvOVQJa6E0ck1xKmhU6FLn0atQ0vTYShVb+gsW0gQ=
SHA256 (Pkgfile) = b563b62af4b467893d062e4267c922478846666e8ac65a2745931bc5ed2eed21
SHA256 (.footprint) = a9a364d7e2bbef7720924f85e357275eb86e59cc4aa440b7097f63b3ccaf135b
RWSagIOpLGJF38rpcrBxl1JD9eBkIcZMnv2CYe4butoAK+WZDdG07bE5IibhqvdlPHMed83P1NdKmFhba58PsXK0epmGF82isAU=
SHA256 (Pkgfile) = b58783f081e15fcebf788e2c2d615fe818dd132215fd5a069a369b5efa0632e6
SHA256 (.footprint) = 775b136e9873dded09fd84001978815c32ebbb505ce6ce8df4f306b8bf53a68e
SHA256 (bftpd-6.1.tar.gz) = 9721d0614e1a5d0fe6b80c9a8a04ada8efd42cbdfddd239e95a8059ae283aa6f
SHA256 (ftpd) = ce0c5b457c3511881ae226be6011326e59d80424ebe7ece3503982c4249b11ec
SHA256 (ftpd) = d9cffdc59c2f342c9b1a74fef80eb0f13794811fef8195a802b52295fdb107d0

View File

@ -4,32 +4,30 @@
name=bftpd
version=6.1
release=1
release=2
source=(https://downloads.sourceforge.net/project/$name/$name/$name-$version/$name-$version.tar.gz
ftpd)
ftpd)
build() {
cd $name
cd $name
CFLAGS+=' -fcommon'
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-libz
CFLAGS+=' -fcommon'
sed -e '/var\/run/d' \
-e '/^sbindir=/a sysconfdir=@sysconfdir@\nlocalstatedir=@localstatedir@' \
-e 's/$.prefix.\/etc/$(sysconfdir)/' \
-e 's/$.prefix.\/var/$(localstatedir)/' \
-i Makefile.in
./configure --prefix=/usr \
--mandir=/usr/share/man \
--localstatedir=/var \
--sysconfdir=/etc \
--enable-libz
make
install -d $PKG/usr/sbin $PKG/etc $PKG/etc/rc.d
make DESTDIR=$PKG install
make
install -d $PKG/usr/sbin $PKG/etc $PKG/etc/rc.d
make DESTDIR=$PKG install
# bftpd version 3.7 moved these directories and --sysconfdir
# --localstatedir does not work currently
mv $PKG/usr/etc/bftpd.conf $PKG/etc/
mv $PKG/usr/var $PKG/var/
rmdir $PKG/usr/etc
install -D -m 0755 $SRC/ftpd $PKG/etc/rc.d/ftpd
chmod 0600 $PKG/etc/bftpd.conf
ln -sf bftpd $PKG/usr/sbin/in.ftpd
install -D -m 0755 $SRC/ftpd $PKG/etc/rc.d/ftpd
chmod 0600 $PKG/etc/bftpd.conf
ln -sf bftpd $PKG/usr/sbin/in.ftpd
}

View File

@ -5,6 +5,7 @@
case $1 in
start)
[ -d /run/bftpd ] || mkdir /run/bftpd
/usr/sbin/bftpd -d
;;
stop)