mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
- Fixed certificate handling
- Fix handling of configuration files - Bump PORTREVISION PR: 106170 Submitted by: trasz
This commit is contained in:
parent
9ea22cc9bf
commit
3b45eafeaf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=178884
@ -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>
|
||||
|
@ -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 @@
|
||||
@@ -110,10 +110,6 @@
|
||||
install-only: install-man install-wired
|
||||
|
||||
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)/etc/wired.conf ]; then \
|
||||
- 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/; \
|
||||
+ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/wired.conf.sample; \
|
||||
fi
|
||||
|
||||
- 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/
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user