From dbcff4fdc8a1bf89d14420adc5ef458f58cd66ca Mon Sep 17 00:00:00 2001 From: John McQuah Date: Wed, 20 Sep 2023 12:35:06 +0000 Subject: [PATCH] bftpd: patch Makefile to respect sysconfdir, localstatedir --- bftpd/.footprint | 2 -- bftpd/.signature | 8 ++++---- bftpd/Pkgfile | 42 ++++++++++++++++++++---------------------- bftpd/ftpd | 1 + 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/bftpd/.footprint b/bftpd/.footprint index 3a8d49421..f9454098d 100644 --- a/bftpd/.footprint +++ b/bftpd/.footprint @@ -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/ diff --git a/bftpd/.signature b/bftpd/.signature index 8dc9eae1d..3f5fe5971 100644 --- a/bftpd/.signature +++ b/bftpd/.signature @@ -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 diff --git a/bftpd/Pkgfile b/bftpd/Pkgfile index c370c0467..4ca516734 100644 --- a/bftpd/Pkgfile +++ b/bftpd/Pkgfile @@ -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 } diff --git a/bftpd/ftpd b/bftpd/ftpd index cc22cd7eb..543f9452f 100755 --- a/bftpd/ftpd +++ b/bftpd/ftpd @@ -5,6 +5,7 @@ case $1 in start) + [ -d /run/bftpd ] || mkdir /run/bftpd /usr/sbin/bftpd -d ;; stop)