aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2009-08-08 15:56:06 +0800
committerpav <pav@FreeBSD.org>2009-08-08 15:56:06 +0800
commite2eb7dacc33d317d0ed01fb2f7c76f6596526846 (patch)
tree646b11a7194766a1a11bb0b3fc74d793a145a02a
parentee4ad3f09c2cdef532efbfaacdc499d29e4f7788 (diff)
downloadfreebsd-ports-gnome-e2eb7dacc33d317d0ed01fb2f7c76f6596526846.tar.gz
freebsd-ports-gnome-e2eb7dacc33d317d0ed01fb2f7c76f6596526846.tar.zst
freebsd-ports-gnome-e2eb7dacc33d317d0ed01fb2f7c76f6596526846.zip
- Fix plist
PR: ports/137507 Submitted by: J. Kelly Hays <kelly.hays@jkhfamily.org> (maintainer)
-rw-r--r--net-im/prosody/Makefile4
-rw-r--r--net-im/prosody/files/patch-Makefile18
-rw-r--r--net-im/prosody/files/pkg-install.in7
-rw-r--r--net-im/prosody/files/prosody.cfg.lua.install.in95
-rw-r--r--net-im/prosody/pkg-plist11
5 files changed, 35 insertions, 100 deletions
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile
index 5a05febc69d2..6ba1ec673382 100644
--- a/net-im/prosody/Makefile
+++ b/net-im/prosody/Makefile
@@ -7,6 +7,7 @@
PORTNAME= prosody
PORTVERSION= 0.5.1
+PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= http://prosody.im/downloads/source/
@@ -29,11 +30,10 @@ HAS_CONFIGURE= yes
CONFIGURE_ARGS+="--ostype=freebsd"
CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}" LUA_SUFFIX="-${LUA_VER}" LUA_LIBDIR="${LUA_LIBDIR}" LUA_INCDIR="${LUA_INCDIR}"
-SUB_FILES= pkg-install pkg-deinstall prosody.cfg.lua.install
+SUB_FILES= pkg-install pkg-deinstall
pre-install:
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- ${MV} ${WRKDIR}/prosody.cfg.lua.install ${WRKSRC}/prosody.cfg.lua.install
${REINPLACE_CMD} -e 's|/usr/bin/env lua|${LUA_CMD}|' ${WRKSRC}/prosody ${WRKSRC}/prosodyctl
post-install:
diff --git a/net-im/prosody/files/patch-Makefile b/net-im/prosody/files/patch-Makefile
index 65a99f983988..b5d5880ef3ac 100644
--- a/net-im/prosody/files/patch-Makefile
+++ b/net-im/prosody/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2009-07-27 18:22:51.000000000 +0000
-+++ Makefile 2009-07-27 18:23:25.000000000 +0000
+--- Makefile.orig 2009-07-29 12:54:54.000000000 -0500
++++ Makefile 2009-08-06 21:25:36.000000000 -0500
@@ -6,7 +6,7 @@
MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules
SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody
@@ -9,3 +9,17 @@
INSTALLEDSOURCE = $(PREFIX)/lib/prosody
INSTALLEDCONFIG = $(SYSCONFDIR)
+@@ -29,10 +29,11 @@
+ install -m644 util/* $(SOURCE)/util
+ install -m644 fallbacks/* $(SOURCE)/fallbacks
+ install -m644 plugins/* $(MODULES)
+- install -m644 certs/* $(CONFIG)/certs
++ install -m644 certs/localhost.cert $(CONFIG)/certs/localhost.cert.sample
++ install -m644 certs/localhost.key $(CONFIG)/certs/localhost.key.sample
+ install -m644 plugins/* $(MODULES)
+ install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1
+- test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua
++ install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua.sample
+ test -e prosody.version && install prosody.version $(SOURCE)/prosody.version || true
+ $(MAKE) install -C util-src
+
diff --git a/net-im/prosody/files/pkg-install.in b/net-im/prosody/files/pkg-install.in
index b2d0a64c0d46..0580a656d538 100644
--- a/net-im/prosody/files/pkg-install.in
+++ b/net-im/prosody/files/pkg-install.in
@@ -40,7 +40,12 @@ PRE-INSTALL)
;;
POST-INSTALL)
- chown "${USER}" $PREFIX/var/lib/prosody
+ chown "${USER}:${GROUP}" $PREFIX/var/lib/prosody
+ for file in `find $PREFIX/etc/prosody -type f`; do
+ if [ ! -s "${file%.sample}" ]; then
+ cp -p $file ${file%.sample}
+ fi
+ done
;;
*)
echo "?"
diff --git a/net-im/prosody/files/prosody.cfg.lua.install.in b/net-im/prosody/files/prosody.cfg.lua.install.in
deleted file mode 100644
index 4dc9e9c93405..000000000000
--- a/net-im/prosody/files/prosody.cfg.lua.install.in
+++ /dev/null
@@ -1,95 +0,0 @@
--- Prosody Example Configuration File
---
--- If it wasn't already obvious, -- starts a comment, and all
--- text after it on a line is ignored by Prosody.
---
--- The config is split into sections, a global section, and one
--- for each defined host that we serve. You can add as many host
--- sections as you like.
---
--- Lists are written { "like", "this", "one" }
--- Lists can also be of { 1, 2, 3 } numbers, etc.
--- Either commas, or semi-colons; may be used
--- as seperators.
---
--- A table is a list of values, except each value has a name. An
--- example would be:
---
--- logging = { type = "html", directory = "/var/logs", rotate = "daily" }
---
--- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so
--- can
--- be placed anywhere
--- that you deem fitting.
---
--- Tip: You can check that the syntax of this file is correct when you have finished
--- by running: luac -p prosody.cfg.lua
--- If there are any errors, it will let you know what and where they are, otherwise it
--- will keep quiet.
---
--- The only thing left to do is rename this file to remove the .dist ending, and fill in the
--- blanks. Good luck, and happy Jabbering!
-
--- Global settings go in this section
-Host "*"
- prosody_user = "prosody"
- pidfile = "%%PREFIX%%/var/lib/prosody/prosody.pid"
- log = {
- { levels = { min = "info" }, to = "syslog" };
- }
- -- This is the list of modules Prosody will load on startup.
- -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
- modules_enabled = {
- -- Generally required
- "roster"; -- Allow users to have a roster. Recommended ;)
- "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
- --"tls"; -- Add support for secure TLS on c2s/s2s connections
- "dialback"; -- s2s dialback support
- "disco"; -- Service discovery
-
- -- Not essential, but recommended
- "private"; -- Private XML storage (for room bookmarks, etc.)
- "vcard"; -- Allow users to set vCards
-
- -- Nice to have
- "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
- "version"; -- Replies to server version requests
- "uptime"; -- Report how long server has been running
- "time"; -- Let others know the time here on this server
- "pep"; -- Enables users to publish their mood, activity, playing music and more
- "ping"; -- Replies to XMPP pings with pongs
-
- -- Other specific functionality
- --"register"; -- Allow users to register on this server using a client
- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
- --"console"; -- telnet to port 5582 (needs console_enabled = true)
- --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
- --"httpserver"; -- Serve static files from a directory over HTTP
- };
-
- -- These are the SSL/TLS-related settings. If you don't want
- -- to use SSL/TLS, you may comment or remove this
--- ssl = {
--- key = "certs/localhost.key";
--- certificate = "certs/localhost.cert";
--- }
-
--- This allows clients to connect to localhost. No harm in it.
-Host "localhost"
-
--- Section for example.com
--- (replace example.com with your domain name)
---Host "example.com"
--- -- Assign this host a certificate for TLS, otherwise it would use the one
--- -- set in the global section (if any).
--- -- Note that old-style SSL on port 5223 only supports one certificate, and will always
--- -- use the global one.
--- ssl = {
--- key = "certs/example.com.key";
--- certificate = "certs/example.com.crt";
--- }
---
--- enabled = false -- This will disable the host, preserving the config, but denying connections
-
--- Set up a MUC (multi-user chat) room server on conference.example.com:
---Component "conference.example.com" "muc"
diff --git a/net-im/prosody/pkg-plist b/net-im/prosody/pkg-plist
index 6e961e199b62..ba83e8c95f43 100644
--- a/net-im/prosody/pkg-plist
+++ b/net-im/prosody/pkg-plist
@@ -1,5 +1,16 @@
bin/prosody
bin/prosodyctl
+@unexec if cmp -s %D/etc/prosody/prosody.cfg.lua.sample %D/etc/prosody/prosody.cfg.lua; then rm -f %D/etc/prosody/prosody.cfg.lua; fi
+etc/prosody/prosody.cfg.lua.sample
+@exec if [ ! -f %D/etc/prosody/prosody.cfg.lua ]; then cp -p %D/etc/prosody/prosody.cfg.lua.sample %D/etc/prosody/prosody.cfg.lua; fi
+@unexec if cmp -s %D/etc/prosody/certs/localhost.cert.sample %D/etc/prosody/certs/localhost.cert; then rm -f %D/etc/prosody/certs/localhost.cert; fi
+etc/prosody/certs/localhost.cert.sample
+@exec if [ ! -f %D/etc/prosody/certs/localhost.cert ]; then cp -p %D/etc/prosody/certs/localhost.cert.sample %D/etc/prosody/certs/localhost.cert; fi
+@unexec if cmp -s %D/etc/prosody/certs/localhost.key.sample %D/etc/prosody/certs/localhost.key; then rm -f %D/etc/prosody/certs/localhost.key; fi
+etc/prosody/certs/localhost.key.sample
+@exec if [ ! -f %D/etc/prosody/certs/localhost.key ]; then cp -p %D/etc/prosody/certs/localhost.key.sample %D/etc/prosody/certs/localhost.key; fi
+@dirrmtry etc/prosody/certs
+@dirrmtry etc/prosody
lib/prosody/core/actions.lua
lib/prosody/core/componentmanager.lua
lib/prosody/core/configmanager.lua