diff --git a/Makefile b/Makefile index 0f541939dab0ce863afcf371f217a2d6fffc396c..7617bc52b7a173875299519237ecfd34f3dd1b8f 100644 --- a/Makefile +++ b/Makefile @@ -4,19 +4,16 @@ CC = gcc DEBUG = -g CFLAGS = -Wall -c $(DEBUG) LFLAGS = -Wall $(DEBUG) +DESTDIR = / .PHONY : $(OBJS) fanout : fanout.c $(CC) $(LFLAGS) $(OBJS) -o $(PROJ) fanout.c -debian-install: - -groupadd -f fanout - -useradd -g fanout -d /var/run/fanout -m -s /bin/false fanout - cp fanout /usr/local/bin - cp debian/fanout.init /etc/init.d/fanout - cp debian/fanout.default /etc/default/fanout +install: + mkdir -p $(DESTDIR)/usr/sbin + cp fanout $(DESTDIR)/usr/sbin/fanout clean: - \rm fanout - + test \! -f fanout || rm fanout diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000000000000000000000000000000000000..8bef18f66550d9dfadc85e47534f13e0656074d2 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +fanout (0.1-1) UNRELEASED; urgency=medium + + * Initial release. + + -- MAINTAINER <elliot.kendall@gmail.com> Fri, 06 Jun 2014 11:06:41 -0700 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000000000000000000000000000000000000..ec635144f60048986bc560c5576355344005e6e7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000000000000000000000000000000000..bbea912b1d8eb63dc6d2fcf224abe3a60c79505a --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: fanout +Maintainer: Elliot Kendall <elliot.kendall@gmail.com> +Section: misc +Priority: optional +Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9) + +Package: fanout +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: simple pubsub server + fanout is a simple pubsub server diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000000000000000000000000000000000000..ba31e1e8ab4a737d3ce2400e6973b13a98e39def --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2011-2012 Travis Glenn Hansen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/debian/fanout.default b/debian/fanout.default index 3c7526bd2de33e9e5b8bd018e24561b984ccdac4..5f95c5efdb066dfbcb16fac5ff55bbc6f789e94d 100644 --- a/debian/fanout.default +++ b/debian/fanout.default @@ -2,4 +2,4 @@ # Default settings for fanout server # Options to pass to fanout -FANOUT_OPTS="--daemon --pidfile=/var/run/fanout.pid --run-as=fanout:fanout --logfile=/var/log/fanout.log --debug-level=2" +FANOUT_OPTS="--daemon --pidfile=/var/run/fanout.pid --run-as=fanout:fanout --logfile=/var/log/fanout/fanout.log --debug-level=2" diff --git a/debian/fanout.dirs b/debian/fanout.dirs new file mode 100644 index 0000000000000000000000000000000000000000..db5f95940b48042f49932d5a5db80eb4b9590667 --- /dev/null +++ b/debian/fanout.dirs @@ -0,0 +1 @@ +/var/log/fanout diff --git a/debian/fanout.init b/debian/fanout.init index b9fae666aec051083a9e44e331bc212d307ad982..1d7dfc3138bfa32fcf578c2cbb304bcc1555b501 100755 --- a/debian/fanout.init +++ b/debian/fanout.init @@ -12,7 +12,7 @@ set -e SERVICE=fanout -DAEMON=/usr/local/bin/$SERVICE +DAEMON=/usr/sbin/$SERVICE PIDFILE=/var/run/$SERVICE.pid test -x $DAEMON || exit 0 diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000000000000000000000000000000000000..e696c370045d91fe41ffd326f232701276c72bca --- /dev/null +++ b/debian/postinst @@ -0,0 +1,3 @@ +groupadd -f fanout +useradd -g fanout -d /var/run/fanout -m -s /bin/false fanout +chown fanout:fanout /var/log/fanout diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000000000000000000000000000000000000..a93b53f88a78749817779756a02218cb995d6a60 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,2 @@ +/etc/init.d/fanout stop +userdel fanout diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000000000000000000000000000000000000..65783e509314036e30030d48da5d6d25c34fd1c0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f +%: + dh $@ +override_dh_auto_install: + $(MAKE) DESTDIR=$$(pwd)/debian/fanout install diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000000000000000000000000000000000000..163aaf8d82b6c54f23c45f32895dbdfdcc27b047 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)