diff options
author | miwi <miwi@FreeBSD.org> | 2006-12-05 06:03:13 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2006-12-05 06:03:13 +0800 |
commit | 27591f9985e28f6808d3d6a2c2dbf648d15dface (patch) | |
tree | 4e2a43516c42228a0fb67f1d57be35ef204c39bc /net | |
parent | 05a55c276b6f0cbafcccc17ca09420d73e2325ce (diff) | |
download | freebsd-ports-gnome-27591f9985e28f6808d3d6a2c2dbf648d15dface.tar.gz freebsd-ports-gnome-27591f9985e28f6808d3d6a2c2dbf648d15dface.tar.zst freebsd-ports-gnome-27591f9985e28f6808d3d6a2c2dbf648d15dface.zip |
- Fixed certificate handling
- Fix handling of configuration files
- Bump PORTREVISION
PR: 106170
Submitted by: trasz
Diffstat (limited to 'net')
-rw-r--r-- | net/wired/Makefile | 16 | ||||
-rw-r--r-- | net/wired/files/patch-Makefile.in | 95 | ||||
-rw-r--r-- | net/wired/pkg-install | 3 | ||||
-rw-r--r-- | net/wired/pkg-plist | 21 |
4 files changed, 99 insertions, 36 deletions
diff --git a/net/wired/Makefile b/net/wired/Makefile index 7629ec9110da..504c0d9adb6d 100644 --- a/net/wired/Makefile +++ b/net/wired/Makefile @@ -7,11 +7,12 @@ PORTNAME= wired PORTVERSION= 1.3.1 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.zankasoftware.com/dist/ MAINTAINER= trasz@pin.if.uz.zgora.pl -COMMENT= Wired Server +COMMENT= Wired server GNU_CONFIGURE= yes USE_GMAKE= yes @@ -31,9 +32,22 @@ post-install: @if [ ! -f ${PREFIX}/wired/etc/resolv.conf ]; then \ ${CP} -p ${PREFIX}/wired/etc/resolv.conf.sample ${PREFIX}/wired/etc/resolv.conf ; \ fi + @if [ ! -f ${PREFIX}/wired/banlist ]; then \ + ${CP} -p ${PREFIX}/wired/banlist.sample ${PREFIX}/wired/banlist ; \ + fi + @if [ ! -f ${PREFIX}/wired/groups ]; then \ + ${CP} -p ${PREFIX}/wired/groups.sample ${PREFIX}/wired/groups ; \ + fi + @if [ ! -f ${PREFIX}/wired/news ]; then \ + ${CP} -p ${PREFIX}/wired/news.sample ${PREFIX}/wired/news ; \ + fi + @if [ ! -f ${PREFIX}/wired/users ]; then \ + ${CP} -p ${PREFIX}/wired/users.sample ${PREFIX}/wired/users ; \ + fi PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL post-deinstall: + ${RM} -f ${PREFIX}/wired/etc/certificate.pem.sample PKG_PREFIX=${PREFIX} ${SH} pkg-deinstall ${PKGNAME} POST-DEINSTALL .include <bsd.port.mk> diff --git a/net/wired/files/patch-Makefile.in b/net/wired/files/patch-Makefile.in index 97c6444acdcf..dff0237f9450 100644 --- a/net/wired/files/patch-Makefile.in +++ b/net/wired/files/patch-Makefile.in @@ -1,5 +1,5 @@ --- Makefile.in.orig Sun Jun 18 15:08:08 2006 -+++ Makefile.in Thu Nov 23 21:07:15 2006 ++++ Makefile.in Sun Dec 3 22:04:11 2006 @@ -12,8 +12,8 @@ WD_VERSION = @WD_VERSION@ @@ -20,42 +20,79 @@ chmod +x $@ $(rundir)/etc/wired.conf: $(top_srcdir)/wired/wired.conf.in -@@ -145,15 +145,15 @@ - fi +@@ -110,10 +110,6 @@ + install-only: install-man install-wired - if [ ! -f $(installdir)/etc/wired.conf ]; then \ -- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/; \ -+ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/wired.conf.sample; \ + install-wired: +- @if [ -e $(installdir)/wired ]; then \ +- touch .update; \ +- fi +- + $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/ + $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/etc/ + $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) -d $(installdir)/tmp/ +@@ -128,55 +124,16 @@ + $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/files/Drop\ Box/.wired/type $(installdir)/files/Drop\ Box/.wired/; \ fi +- if [ ! -f $(installdir)/banlist ]; then \ +- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/banlist $(installdir)/; \ +- fi +- +- if [ ! -f $(installdir)/groups ]; then \ +- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/groups $(installdir)/; \ +- fi +- +- if [ ! -f $(installdir)/news ]; then \ +- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/news $(installdir)/; \ +- fi +- +- if [ ! -f $(installdir)/users ]; then \ +- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/users $(installdir)/; \ +- fi +- +- if [ ! -f $(installdir)/etc/wired.conf ]; then \ +- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/; \ +- fi +- - $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/hl2wired $(installdir)/ - $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wired $(installdir)/ - $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wiredctl $(installdir)/ +- +- if [ -f /etc/resolv.conf ]; then \ +- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) /etc/resolv.conf $(installdir)/etc/; \ +- fi +- +- @if [ -f .update ]; then \ +- echo ""; \ +- echo "Update complete!"; \ +- echo ""; \ +- echo "You should now run:"; \ +- echo " $(installdir)/wiredctl restart"; \ +- echo "to restart a running server."; \ +- else \ +- echo ""; \ +- echo "Installation complete!"; \ +- echo ""; \ +- echo "An administrator account with login \"admin\" and no password has been created."; \ +- echo ""; \ +- echo "Remember to edit $(installdir)/etc/wired.conf if you want to make any changes before starting the server."; \ +- echo ""; \ +- echo "When you are done, run:"; \ +- echo " $(installdir)/wiredctl start"; \ +- echo "to start the server."; \ +- fi ++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/banlist $(installdir)/banlist.sample ++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/groups $(installdir)/groups.sample ++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/news $(installdir)/news.sample ++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/users $(installdir)/users.sample ++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/wired.conf.sample + $(INSTALL) -m 755 -o 0 -g 0 $(rundir)/hl2wired $(prefix)/sbin/ + $(INSTALL) -m 755 -o 0 -g 0 $(rundir)/wired $(prefix)/sbin/ + $(INSTALL) -m 755 -o 0 -g 0 $(rundir)/wiredctl $(prefix)/bin/ - if [ -f /etc/resolv.conf ]; then \ -- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) /etc/resolv.conf $(installdir)/etc/; \ -+ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) /etc/resolv.conf $(installdir)/etc/resolv.conf.sample; \ - fi - - @if [ -f .update ]; then \ -@@ -161,7 +161,7 @@ - echo "Update complete!"; \ - echo ""; \ - echo "You should now run:"; \ -- echo " $(installdir)/wiredctl restart"; \ -+ echo " $(prefix)/bin/wiredctl restart"; \ - echo "to restart a running server."; \ - else \ - echo ""; \ -@@ -172,7 +172,7 @@ - echo "Remember to edit $(installdir)/etc/wired.conf if you want to make any changes before starting the server."; \ - echo ""; \ - echo "When you are done, run:"; \ -- echo " $(installdir)/wiredctl start"; \ -+ echo " $(prefix)/bin/wiredctl start"; \ - echo "to start the server."; \ - fi +- @rm -f .update ++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) /etc/resolv.conf $(installdir)/etc/resolv.conf.sample + install-man: + $(INSTALL) -m 755 -d $(mandir)/man1/ diff --git a/net/wired/pkg-install b/net/wired/pkg-install index 3667f4bf8fe8..35af862613ac 100644 --- a/net/wired/pkg-install +++ b/net/wired/pkg-install @@ -72,6 +72,9 @@ PRE-INSTALL) POST-INSTALL) openssl req -batch -new -x509 -nodes -out ${PKG_PREFIX}/wired/etc/certificate.pem.sample -keyout ${PKG_PREFIX}/wired/etc/certificate.pem.sample; + + # We have to do this here instead of @exec in pkg-plist, because @exec clause + # is executed before POST-INSTALL, which creates the certificate.pem.sample. if [ ! -f ${PKG_PREFIX}/wired/etc/certificate.pem ]; then cp -p ${PKG_PREFIX}/wired/etc/certificate.pem.sample ${PKG_PREFIX}/wired/etc/certificate.pem; fi diff --git a/net/wired/pkg-plist b/net/wired/pkg-plist index b4833669cee3..bf06a5ab8697 100644 --- a/net/wired/pkg-plist +++ b/net/wired/pkg-plist @@ -1,6 +1,7 @@ @unexec if cmp -s %D/wired/etc/certificate.pem.sample %D/wired/etc/certificate.pem; then rm -f %D/wired/etc/certificate.pem; fi -wired/etc/certificate.pem.sample -@exec if [ ! -f %D/wired/etc/certificate.pem ] ; then cp -p %D/%F %B/certificate.pem; fi +@comment The file below gets created by pkg-install script, so there is no point +@comment in putting it into plist. +@unexec rm -f %D/wired/etc/certificate.pem.sample @unexec if cmp -s %D/wired/etc/wired.conf.sample %D/wired/etc/wired.conf; then rm -f %D/wired/etc/wired.conf; fi wired/etc/wired.conf.sample @exec if [ ! -f %D/wired/etc/wired.conf ] ; then cp -p %D/%F %B/wired.conf; fi @@ -9,10 +10,18 @@ wired/etc/resolv.conf.sample @exec if [ ! -f %D/wired/etc/resolv.conf ] ; then cp -p %D/%F %B/resolv.conf; fi wired/files/Uploads/.wired/type wired/files/Drop Box/.wired/type -wired/banlist -wired/groups -wired/news -wired/users +@unexec if cmp -s %D/wired/banlist.sample %D/wired/banlist; then rm -f %D/wired/banlist; fi +wired/banlist.sample +@exec if [ ! -f %D/wired/banlist ] ; then cp -p %D/%F %B/banlist; fi +@unexec if cmp -s %D/wired/groups.sample %D/wired/groups; then rm -f %D/wired/groups; fi +wired/groups.sample +@exec if [ ! -f %D/wired/groups ] ; then cp -p %D/%F %B/groups; fi +@unexec if cmp -s %D/wired/news.sample %D/wired/news; then rm -f %D/wired/news; fi +wired/news.sample +@exec if [ ! -f %D/wired/news ] ; then cp -p %D/%F %B/news; fi +@unexec if cmp -s %D/wired/users.sample %D/wired/users; then rm -f %D/wired/users; fi +wired/users.sample +@exec if [ ! -f %D/wired/users ] ; then cp -p %D/%F %B/users; fi sbin/hl2wired sbin/wired bin/wiredctl |