bftpd: remove usr/etc, mark conf_files

This commit is contained in:
Đoàn Trần Công Danh 2022-09-05 23:13:09 +07:00
parent 8b95d47f65
commit 765ab3eaaa
2 changed files with 47 additions and 8 deletions

View File

@ -0,0 +1,43 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,7 +15,7 @@ OBJS=bftpdutmp.o commands.o commands_adm
SRCS=bftpdutmp.c commands.c commands_admin.c cwd.c dirlist.c list.c login.c logging.c main.c mystring.c options.c md5.c
OBJS2LINK=$(OBJS) $(PAX)
-LDFLAGS=
+LDFLAGS=@LDFLAGS@
all: bftpd
@@ -37,18 +37,12 @@ endif
%.o: %.d
install: all
- mkdir -p $(DESTDIR)/$(prefix)/sbin
- $(INSTALL) -g 0 -m 700 -o 0 bftpd $(DESTDIR)/$(prefix)/sbin
+ mkdir -p $(DESTDIR)/$(prefix)/bin
+ $(INSTALL) -g 0 -m 700 -o 0 bftpd $(DESTDIR)/$(prefix)/bin
mkdir -p $(DESTDIR)/$(mandir)/man8
$(INSTALL) -g 0 -m 644 -o 0 bftpd.8 $(DESTDIR)/$(mandir)/man8
- mkdir -p $(DESTDIR)/$(prefix)/etc
- [ -f $(DESTDIR)/$(prefix)/etc/bftpd.conf ] || \
- $(INSTALL) -g 0 -m 600 -o 0 bftpd.conf $(DESTDIR)/$(prefix)/etc
- mkdir -p $(DESTDIR)/$(prefix)/var/log
- touch $(DESTDIR)/$(prefix)/var/log/bftpd.log
- chmod 644 $(DESTDIR)/$(prefix)/var/log/bftpd.log
- mkdir -p $(DESTDIR)/$(prefix)/var/run/bftpd
- chmod 755 $(DESTDIR)/$(prefix)/var/run/bftpd
+ mkdir -p $(DESTDIR)/etc
+ $(INSTALL) -g 0 -m 600 -o 0 bftpd.conf $(DESTDIR)/etc
clean distclean:
rm -f *~ $(OBJS) bftpd mksources.finished config.cache
--- a/mypaths.h
+++ b/mypaths.h
@@ -1,5 +1,5 @@
#define PATH_BFTPD_CONF "/etc/bftpd.conf"
-#ifdef PREFIX
+#if 0
#define PATH_BFTPD_CONF_WITH_PREFIX PREFIX"/etc/bftpd.conf"
#endif
#define PATH_STATUSLOG "/dev/null"

View File

@ -2,7 +2,7 @@
pkgname=bftpd
version=6.1
revision=1
wrksrc="$pkgname"
wrksrc="bftpd"
build_style=gnu-configure
configure_args="--enable-libz"
makedepends="zlib-devel"
@ -14,14 +14,10 @@ distfiles="${SOURCEFORGE_SITE}/bftpd/bftpd-${version}.tar.gz"
checksum=9721d0614e1a5d0fe6b80c9a8a04ada8efd42cbdfddd239e95a8059ae283aa6f
CFLAGS="-fcommon"
post_configure() {
vsed -i -e "s|LDFLAGS=$|LDFLAGS=${LDFLAGS}|" \
-e "s|sbin|bin|g" \
Makefile
}
make_build_args=V=1
make_dirs="/var/run/bftpd 0755 root root"
conf_files="/etc/bftpd.conf"
post_install() {
vsv bftpd
vconf bftpd.conf
}