pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wendzelnntpd: Improve package



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Wed May 12 18:58:55 2021 +0200
Changeset:	20fc07bb85a6325970d7f59c2627c5a02b8044e9

Modified Files:
	wendzelnntpd/Makefile
	wendzelnntpd/PLIST
	wendzelnntpd/distinfo
	wendzelnntpd/patches/patch-Makefile
	wendzelnntpd/patches/patch-src_config.y

Log Message:
wendzelnntpd: Improve package

Build works.
Database is not created yet.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=20fc07bb85a6325970d7f59c2627c5a02b8044e9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 wendzelnntpd/Makefile                   |  28 ++++++--
 wendzelnntpd/PLIST                      |  27 ++++----
 wendzelnntpd/distinfo                   |   4 +-
 wendzelnntpd/patches/patch-Makefile     | 109 +++++++++-----------------------
 wendzelnntpd/patches/patch-src_config.y |   2 +-
 5 files changed, 66 insertions(+), 104 deletions(-)

diffs:
diff --git a/wendzelnntpd/Makefile b/wendzelnntpd/Makefile
index 04a8d46b52..70486aa38e 100644
--- a/wendzelnntpd/Makefile
+++ b/wendzelnntpd/Makefile
@@ -10,26 +10,40 @@ HOMEPAGE=	https://sourceforge.net/projects/wendzelnntpd
 COMMENT=	Free Usenet server with SQL backend and RBAC
 LICENSE=	gnu-gpl-v3
 
-USE_TOOLS+=	bison flex
+USE_TOOLS+=	bison flex gmake
 USE_FEATURES=	err regcomp snprintf
 
 BUILD_DEFS+=		VARBASE
-INSTALLATION_DIRS=	sbin share/doc/wendzelnntpd share/man/man8
+
+# Build system expects PREFIX as part of DESTDIR
+SUBST_CLASSES+=		make
+SUBST_MESSAGE.make=	Adjust Makefile
+SUBST_STAGE.make=	pre-configure
+SUBST_FILES.make+=	Makefile
+SUBST_SED.make+=	-e 's,$$(DESTDIR),$$(DESTDIR)$$(PREFIX),g'
+
+# Directory for example config file
+FAKECDIR=		${DESTDIR}${PREFIX}/share/examples/wendzelnntpd
+
+INSTALLATION_DIRS=	sbin share/doc/wendzelnntpd ${PKGMANDIR}/man8
 SPECIAL_PERMS+=		sbin/wendzelnntpd \
 			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
 SPECIAL_PERMS+=		sbin/wendzelnntpadm \
 			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
 OWN_DIRS_PERMS+=	${VARBASE}/spool/news/wendzelnntpd \
-			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
-CONF_FILES_PERMS=	${DESTDIR}${PREFIX}/share/examples/wendzelnntpd/wendzelnntpd.conf \
+			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 700
+CONF_FILES_PERMS=	${FAKECDIR}/wendzelnntpd.conf \
 			${PKG_SYSCONFDIR}/wendzelnntpd.conf \
 			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0644
 WRKSRC=			${WRKDIR}/cdpxe-WendzelNNTPd-17d557d
 
+CONFIGURE_ENV+=		MYSQL=NO
+CONFIGURE_ENV+=		CONFDIR=${PKG_SYSCONFDIR}
+CONFIGURE_ENV+=		FAKECDIR=${FAKECDIR}
+CONFIGURE_ENV+=		DESTDIR=${DESTDIR}
+
 do-configure:
-	cd ${WRKSRC} && env MYSQL=NO CONFDIR=${PKG_SYSCONFDIR}/etc \
-		FAKECDIR=${DESTDIR}${PKG_SYSCONFDIR} \
-		${CONFIGURE_ENV} ${CONFIG_SHELL} ./configure
+	cd ${WRKSRC} && env ${CONFIGURE_ENV} ${CONFIG_SHELL} ./configure
 
 .include "../../databases/sqlite3/buildlink3.mk"
 .include "../../security/mhash/buildlink3.mk"
diff --git a/wendzelnntpd/PLIST b/wendzelnntpd/PLIST
index a1fe0a6a50..385c5e23fe 100644
--- a/wendzelnntpd/PLIST
+++ b/wendzelnntpd/PLIST
@@ -1,7 +1,8 @@
 @comment $NetBSD$
-etc/wendzelnntpd.conf
-share/man/man8/wendzelnntpadm.8
-share/man/man8/wendzelnntpd.8
+man/man8/wendzelnntpadm.8
+man/man8/wendzelnntpd.8
+sbin/wendzelnntpadm
+sbin/wendzelnntpd
 share/doc/wendzelnntpd/AUTHOR
 share/doc/wendzelnntpd/CHANGELOG
 share/doc/wendzelnntpd/HISTORY
@@ -9,23 +10,21 @@ share/doc/wendzelnntpd/INSTALL
 share/doc/wendzelnntpd/LICENSE
 share/doc/wendzelnntpd/README.md
 share/doc/wendzelnntpd/docs.pdf
-share/doc/wendzelnntpd/mysql_db_struct.sql
-share/doc/wendzelnntpd/usenet.db_struct
 share/doc/wendzelnntpd/docs/contents.png
-share/doc/wendzelnntpd/docs/docs.html
-share/doc/wendzelnntpd/docs/footnote.png
-share/doc/wendzelnntpd/docs/index.html
-share/doc/wendzelnntpd/docs/next.png
-share/doc/wendzelnntpd/docs/nx_grp_g.png
-share/doc/wendzelnntpd/docs/prev_g.png
-share/doc/wendzelnntpd/docs/up_g.png
 share/doc/wendzelnntpd/docs/docs.css
+share/doc/wendzelnntpd/docs/docs.html
 share/doc/wendzelnntpd/docs/footnode.html
+share/doc/wendzelnntpd/docs/footnote.png
 share/doc/wendzelnntpd/docs/img1.png
+share/doc/wendzelnntpd/docs/index.html
 share/doc/wendzelnntpd/docs/index.png
+share/doc/wendzelnntpd/docs/next.png
 share/doc/wendzelnntpd/docs/next_g.png
+share/doc/wendzelnntpd/docs/nx_grp_g.png
 share/doc/wendzelnntpd/docs/prev.png
+share/doc/wendzelnntpd/docs/prev_g.png
 share/doc/wendzelnntpd/docs/up.png
+share/doc/wendzelnntpd/docs/up_g.png
+share/doc/wendzelnntpd/mysql_db_struct.sql
+share/doc/wendzelnntpd/usenet.db_struct
 share/examples/wendzelnntpd/wendzelnntpd.conf
-sbin/wendzelnntpadm
-sbin/wendzelnntpd
diff --git a/wendzelnntpd/distinfo b/wendzelnntpd/distinfo
index 078d5d085f..7b7fa3f27c 100644
--- a/wendzelnntpd/distinfo
+++ b/wendzelnntpd/distinfo
@@ -4,7 +4,7 @@ SHA1 (v2.1.3.tar.gz) = 4b857d97154460c6c275493fda9090f8c5339a76
 RMD160 (v2.1.3.tar.gz) = 8942471851dcd373854893c8e0c10d5e146195ab
 SHA512 (v2.1.3.tar.gz) = 13f2a1fdaeeb4c663a4c43d1f3a819ae0975a3dacd1f720d618e95717dd4ecca4921498f1730a9ddd2e82531866da3d0716531976b1b74510ec0fca19c15071f
 Size (v2.1.3.tar.gz) = 4773954 bytes
-SHA1 (patch-Makefile) = d21d115baa145cbbb4ddf85b195ee7bc135e2829
+SHA1 (patch-Makefile) = 83667edde0fee10d79f31983cb5250931929893e
 SHA1 (patch-configure) = f00a38e5bad77a1e2d9b662a947e7206ebe96c58
-SHA1 (patch-src_config.y) = 2a322861c95458c6f5ba02f90401e335b564759d
+SHA1 (patch-src_config.y) = a4e940335de40c3c77982706a1c269710a3f7396
 SHA1 (patch-src_hash.c) = 90fe9c0a02798a1b78e192ed934eb7ea3444fd6e
diff --git a/wendzelnntpd/patches/patch-Makefile b/wendzelnntpd/patches/patch-Makefile
index 55b8d5d01f..2e3f75f65b 100644
--- a/wendzelnntpd/patches/patch-Makefile
+++ b/wendzelnntpd/patches/patch-Makefile
@@ -1,117 +1,66 @@
 $NetBSD$
 
-Modify permission handling for pkgsrc.
+Do not set permissions here (handled by pkgsrc).
+Install man pages to "man" instead of "share/man" directory.
+Do not initialize sqlite3 database.
 
 --- Makefile.orig	2021-04-17 20:18:01.000000000 +0000
 +++ Makefile
-@@ -5,7 +5,7 @@
- 
- include Makefile.inc
- 
--UDBFILE=/var/spool/news/wendzelnntpd/usenet.db
-+UDBFILE=$(DESTDIR)/var/spool/news/wendzelnntpd/usenet.db
- DESTCFLAGS=-DCONFDIR=\"$(CONFDIR)\"
- HEADERS=$(SRC)/include/cdpstrings.h $(SRC)/include/main.h $(SRC)/include/wendzelnntpdpath.h
- CFLAGS= -c -Wall $(STACK_PROT) $(DESTCFLAGS)
-@@ -21,7 +21,8 @@ GDBON=-ggdb -g #-lefence
- 
- #DEBUG=$(GDBON) -DDEBUG -DXXDEBUG
- 
--BUILDFLAGS=-O2 $(STACK_PROT) $(ADD_LNKFLAGS)
-+#BUILDFLAGS=-O2 $(STACK_PROT) $(ADD_LNKFLAGS)
-+BUILDFLAGS=$(ADD_LNKFLAGS)
- 
- # The list of documentation files we wish to install
- DOCFILES_TO_INST=AUTHOR CHANGELOG HISTORY README.md INSTALL LICENSE database/usenet.db_struct database/mysql_db_struct.sql
-@@ -98,44 +99,47 @@ wendzelnntpadm : cdpnntpadm.o db_abstrac
- 
- install : bin/wendzelnntpd bin/wendzelnntpadm
- 	if [ ! -d $(FAKECDIR) ]; then install -d -m 0755 $(FAKECDIR); fi
--	if [ ! -d $(DESTDIR)/sbin ]; then install -d -m 0755 $(DESTDIR)/sbin; fi
--	if [ ! -d $(DESTDIR)/share ]; then install -d -m 0755 $(DESTDIR)/share; fi
--	if [ ! -d $(DESTDIR)/share/doc ]; then install -d -m 0755 $(DESTDIR)/share/doc; fi
--	if [ ! -d $(DESTDIR)/share/doc/wendzelnntpd ]; then install -d -m 0755 $(DESTDIR)/share/doc/wendzelnntpd; fi
+@@ -102,41 +102,42 @@ install : bin/wendzelnntpd bin/wendzelnn
+ 	if [ ! -d $(DESTDIR)/share ]; then install -d -m 0755 $(DESTDIR)/share; fi
+ 	if [ ! -d $(DESTDIR)/share/doc ]; then install -d -m 0755 $(DESTDIR)/share/doc; fi
+ 	if [ ! -d $(DESTDIR)/share/doc/wendzelnntpd ]; then install -d -m 0755 $(DESTDIR)/share/doc/wendzelnntpd; fi
 -	if [ ! -d $(DESTDIR)/share/man/man8 ]; then install -d -m 0755 $(DESTDIR)/share/man/man8; fi
-+	if [ ! -d $(DESTDIR)$(PREFIX)/sbin ]; then install -d -m 0755 $(DESTDIR)$(PREFIX)/sbin; fi
-+	if [ ! -d $(DESTDIR)$(PREFIX)/share ]; then install -d -m 0755 $(DESTDIR)$(PREFIX)/share; fi
-+	if [ ! -d $(DESTDIR)$(PREFIX)/share/doc ]; then install -d -m 0755 $(DESTDIR)$(PREFIX)/share/doc; fi
-+	if [ ! -d $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd ]; then install -d -m 0755 $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd; fi
-+	if [ ! -d $(DESTDIR)$(PREFIX)/share/man/man8 ]; then install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man8; fi
++	if [ ! -d $(DESTDIR)/man/man8 ]; then install -d -m 0755 $(DESTDIR)/man/man8; fi
  	# binaries
--	cp bin/wendzelnntpd bin/wendzelnntpadm $(DESTDIR)/sbin/
+ 	cp bin/wendzelnntpd bin/wendzelnntpadm $(DESTDIR)/sbin/
 -	chown 0:0 $(DESTDIR)/sbin/wendzelnntpd $(DESTDIR)/sbin/wendzelnntpadm
 -	chmod 0755 $(DESTDIR)/sbin/wendzelnntpd $(DESTDIR)/sbin/wendzelnntpadm
-+	cp bin/wendzelnntpd bin/wendzelnntpadm $(DESTDIR)$(PREFIX)/sbin/
-+	# Handled in pkgsrc via SPECIAL_PERMS
-+	#chown 0:0 $(DESTDIR)$(PREFIX)/sbin/wendzelnntpd $(DESTDIR)$(PREFIX)/sbin/wendzelnntpadm
-+	#chmod 0755 $(DESTDIR)$(PREFIX)/sbin/wendzelnntpd $(DESTDIR)$(PREFIX)/sbin/wendzelnntpadm
++	    #chown 0:0 $(DESTDIR)/sbin/wendzelnntpd $(DESTDIR)/sbin/wendzelnntpadm
++	    #chmod 0755 $(DESTDIR)/sbin/wendzelnntpd $(DESTDIR)/sbin/wendzelnntpadm
  	# documentation and config files
--	cp $(DOCFILES_TO_INST) $(DESTDIR)/share/doc/wendzelnntpd/
--	cp -r docs/docs $(DESTDIR)/share/doc/wendzelnntpd/
--	cp docs/docs.pdf $(DESTDIR)/share/doc/wendzelnntpd/docs.pdf
+ 	cp $(DOCFILES_TO_INST) $(DESTDIR)/share/doc/wendzelnntpd/
+ 	cp -r docs/docs $(DESTDIR)/share/doc/wendzelnntpd/
+ 	cp docs/docs.pdf $(DESTDIR)/share/doc/wendzelnntpd/docs.pdf
 -	chown 0:0 $(DESTDIR)/share/doc/wendzelnntpd/*
 -	chmod 0644 $(DESTDIR)/share/doc/wendzelnntpd/*
-+	cp $(DOCFILES_TO_INST) $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/
-+	cp -r docs/docs $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/
-+	cp docs/docs.pdf $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/docs.pdf
-+	#chown 0:0 $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/*
-+	#chmod 0644 $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/*
++	    #chown 0:0 $(DESTDIR)/share/doc/wendzelnntpd/*
++	    #chmod 0644 $(DESTDIR)/share/doc/wendzelnntpd/*
  	# manpages
 -	cp $(MANPAGES) $(DESTDIR)/share/man/man8/
 -	chmod 644 $(DESTDIR)/share/man/man8/wendzelnntpd.8
 -	chmod 644 $(DESTDIR)/share/man/man8/wendzelnntpadm.8
-+	cp $(MANPAGES) $(DESTDIR)$(PREFIX)/share/man/man8/
-+	#chmod 644 $(DESTDIR)$(PREFIX)/share/man/man8/wendzelnntpd.8
-+	#chmod 644 $(DESTDIR)$(PREFIX)/share/man/man8/wendzelnntpadm.8
++	cp $(MANPAGES) $(DESTDIR)/man/man8/
++	    #chmod 644 $(DESTDIR)/man/man8/wendzelnntpd.8
++	    #chmod 644 $(DESTDIR)/man/man8/wendzelnntpadm.8
  	# config
  	@if [ -f $(FAKECDIR)/wendzelnntpd.conf ]; then cp $(FAKECDIR)/wendzelnntpd.conf $(FAKECDIR)/wendzelnntpd.conf.bkp; chmod 0644 $(FAKECDIR)/wendzelnntpd.conf.bkp; echo "***Your old wendzelnntpd.conf was backuped!***"; fi
  	cp wendzelnntpd.conf $(FAKECDIR)/
 -	chown 0:0 $(FAKECDIR)/wendzelnntpd.conf
 -	chmod 0644 $(FAKECDIR)/wendzelnntpd.conf
-+	#chown 0:0 $(FAKECDIR)/wendzelnntpd.conf
-+	#chmod 0644 $(FAKECDIR)/wendzelnntpd.conf
-+	 if [ ! -d $(DESTDIR)$(PREFIX)/share/examples/wendzelnntpd ]; then install -d -m 0755 $(DESTDIR)$(PREFIX)/share/examples/wendzelnntpd; fi
-+	 cp wendzelnntpd.conf $(DESTDIR)$(PREFIX)/share/examples/wendzelnntpd/wendzelnntpd.conf
++	    #chown 0:0 $(FAKECDIR)/wendzelnntpd.conf
++	    #chmod 0644 $(FAKECDIR)/wendzelnntpd.conf
  	# nextmsgid and database/usenet.db are placed here:
 -	mkdir -p /var/spool/news/wendzelnntpd
-+	mkdir -p $(DESTDIR)/var/spool/news/wendzelnntpd
++	    #mkdir -p /var/spool/news/wendzelnntpd
  	# og-rwx since the passwords are stored in the database too!
 -	chmod 700 /var/spool/news/wendzelnntpd
-+	#chmod 700 /var/spool/news/wendzelnntpd
++	    #chmod 700 /var/spool/news/wendzelnntpd
  	# create a backup of the old usenet database, if needed
  	@if [ -f $(UDBFILE) ]; then mv $(UDBFILE) $(UDBFILE).`date +"%m-%d-%y-%H:%M"`.bkp; chmod 0600 $(UDBFILE).`date +"%m-%d-%y-%H:%M"`.bkp; echo "***Your old usenet database was backuped!***"; fi
  	@# create new database, dir already exists due to earlier mkdir call
 -	install -d -m 0700 $(CMD_INSTALL_USEROPT) 0 -g 0 /var/spool/news/wendzelnntpd
-+	#install -d -m 0700 $(CMD_INSTALL_USEROPT) 0 -g 0 $(DESTDIR)/var/spool/news/wendzelnntpd
++	#    install -d -m 0700 $(CMD_INSTALL_USEROPT) 0 -g 0 /var/spool/news/wendzelnntpd
  	@#
  	@# create sqlite initial database if Sqlite3 is used
  	@# AND
  	@# create initial newsgroup for sqlite3
  	@#
 -	@if [ "$(SQLITEINST)" != "NO" ]; then echo "Setting up sqlite3 database ..."; cat database/usenet.db_struct | sqlite3 $(UDBFILE) && ( ./bin/wendzelnntpadm addgroup alt.wendzelnntpd.test y || echo "no new newsgroup created." ); else echo "*** NO sqlite3 database setup performed (you use MySQL). Please read the manual (docs/docs.pdf) to learn how to set up the MySQL database within a few minutes. ***"; fi
-+	#if [ "$(SQLITEINST)" != "NO" ]; then echo "Setting up sqlite3 database ..."; cat database/usenet.db_struct | sqlite3 $(UDBFILE) && ( ./bin/wendzelnntpadm addgroup alt.wendzelnntpd.test y || echo "no new newsgroup created." ); else echo "*** NO sqlite3 database setup performed (you use MySQL). Please read the manual (docs/docs.pdf) to learn how to set up the MySQL database within a few minutes. ***"; fi
- 	@echo "Installation finished. Please note that your existing wendzelnntpd.conf might have been replaced (a backup should be located in the same folder as your original configuration file)."
+-	@echo "Installation finished. Please note that your existing wendzelnntpd.conf might have been replaced (a backup should be located in the same folder as your original configuration file)."
++	    #@if [ "$(SQLITEINST)" != "NO" ]; then echo "Setting up sqlite3 database ..."; cat database/usenet.db_struct | sqlite3 $(UDBFILE) && ( ./bin/wendzelnntpadm addgroup alt.wendzelnntpd.test y || echo "no new newsgroup created." ); else echo "*** NO sqlite3 database setup performed (you use MySQL). Please read the manual (docs/docs.pdf) to learn how to set up the MySQL database within a few minutes. ***"; fi
++	@echo "Installation finished."
++	    #"Please note that your existing wendzelnntpd.conf might have been replaced (a backup should be located in the same folder as your original configuration file)."
  	@echo "Thank you for using this software! Have fun using it!"
  
-@@ -143,14 +147,14 @@ upgrade : bin/wendzelnntpd bin/wendzelnn
- 	@echo "*** Please only upgrade your WendzelNNTPd if your existing installation is WendzelNNTPd version 2.0.0 or newer. This script replaces only binaries and documentation files. Your databases and configuration files remain untouched. Press RETURN to perform an upgrade or press CTRL+C to abort. ***"
- 	@read uselessinput
- 	# binaries
--	cp bin/wendzelnntpd bin/wendzelnntpadm $(DESTDIR)/sbin/
--	chown 0:0 $(DESTDIR)/sbin/wendzelnntpd $(DESTDIR)/sbin/wendzelnntpadm
--	chmod 0755 $(DESTDIR)/sbin/wendzelnntpd $(DESTDIR)/sbin/wendzelnntpadm
-+	cp bin/wendzelnntpd bin/wendzelnntpadm $(DESTDIR)$(PREFIX)/sbin/
-+	chown 0:0 $(DESTDIR)$(PREFIX)/sbin/wendzelnntpd $(DESTDIR)$(PREFIX)/sbin/wendzelnntpadm
-+	chmod 0755 $(DESTDIR)$(PREFIX)/sbin/wendzelnntpd $(DESTDIR)$(PREFIX)/sbin/wendzelnntpadm
- 	# documentation
--	cp -r docs/docs $(DESTDIR)/share/doc/wendzelnntpd/
--	cp docs/docs.pdf $(DESTDIR)/share/doc/wendzelnntpd/docs.pdf
--	chown 0:0 $(DESTDIR)/share/doc/wendzelnntpd/*
--	chmod 0644 $(DESTDIR)/share/doc/wendzelnntpd/*
-+	cp -r docs/docs $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/
-+	cp docs/docs.pdf $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/docs.pdf
-+	chown 0:0 $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/*
-+	chmod 0644 $(DESTDIR)$(PREFIX)/share/doc/wendzelnntpd/*
- 	@echo "Upgrade finished. Thank you for upgrading and using this software. Have fun!"
- 
- exec : bin/wendzelnntpd
+ upgrade : bin/wendzelnntpd bin/wendzelnntpadm
diff --git a/wendzelnntpd/patches/patch-src_config.y b/wendzelnntpd/patches/patch-src_config.y
index 0416a881d9..6dfe412020 100644
--- a/wendzelnntpd/patches/patch-src_config.y
+++ b/wendzelnntpd/patches/patch-src_config.y
@@ -1,7 +1,7 @@
 $NetBSD$
 
 Patch for pkgsrc feature "err" (USE_FEATURES).
-Add forward declaration for lexer and parser.
+Add forward declarations for lexer and parser functions.
 
 --- src/config.y.orig	2021-04-17 20:18:01.000000000 +0000
 +++ src/config.y


Home | Main Index | Thread Index | Old Index