Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian packaging #200

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions debian/changelog
@@ -0,0 +1,5 @@
subway (2.4-1) unstable; urgency=low

* Initial release

-- Hugues Obolonsky <hugh@atoc.org> Mon, 31 Dec 2012 18:23:44 +0000
1 change: 1 addition & 0 deletions debian/compat
@@ -0,0 +1 @@
8
22 changes: 22 additions & 0 deletions debian/control
@@ -0,0 +1,22 @@
Source: subway
Section: net
Priority: extra
Maintainer: Hugues Obolonsky <hugh@atoc.org>
Build-Depends: debhelper (>= 8.0.0), npm (>= 1.1.69)
Standards-Version: 2.4
Homepage: https://github.com/thedjpetersen/subway
#Vcs-Git: git://github.com/thedjpetersen/subway.git

Package: subway
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, nodejs (>= 0.8.16), mongodb-server
Description: Subway is a web-based IRC client with a multi-user backend and a JavaScript-heavy UI.
Subway is a combination of two projects that started independently with a similar technology stack and similar aims
.
subway-web / subway-server by David Petersen
web-irc by Aaron Kavlie
Its goals are twofold:
1) Become the best web-based IRC client available
2) Provide a really easy method of persistent IRC connections, available from any web browser
.
The inspiration for Subway was trying to watch a fellow programmer try to explain how to set up screen/irssi to a non-technical person.
37 changes: 37 additions & 0 deletions debian/copyright
@@ -0,0 +1,37 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: subway
Source: https://github.com/thedjpetersen/subway

Files: *
Copyright: <2013> <David Petersen>
<2013> <Aaron Kavlie>
<2013> <Eric Barch>
<2013> <HyeonJe Jun>
<2013> <Jamie Soar>
License: MIT

Files: debian/*
Copyright: 2013 Hugues Obolonsky <hugh@atoc.org>
License: MIT

License: MIT
Excepting third-party assets (licensed as specified in their respective files or directories),
this project is covered by the MIT License:

The MIT License (MIT) Copyright (c) 2011 David Petersen

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.

1 change: 1 addition & 0 deletions debian/docs
@@ -0,0 +1 @@
README.md
1 change: 1 addition & 0 deletions debian/files
@@ -0,0 +1 @@
subway_2.4-1_amd64.deb net extra
1 change: 1 addition & 0 deletions debian/patches/series
@@ -0,0 +1 @@
subway-makefile.diff
46 changes: 46 additions & 0 deletions debian/patches/subway-makefile.diff
@@ -0,0 +1,46 @@
Description: Patch add Makefile for packaging
Author: <hugh@atosc.org>
Last-Update: 2013-01-03
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+#******************************************
+#*
+#* Simple Makefile for Subway
+#*
+#*/
+
+COPY = /bin/cp -rp
+INSTALL = /usr/bin/install -c -m 644
+INSTALL_DIR = assets lib views node_modules
+
+etc_prefix = $(DESTDIR)/etc
+lib_prefix = $(DESTDIR)/var/lib
+bin_prefix = $(DESTDIR)/usr/bin
+log_prefix = $(DESTDIR)/var/log
+
+all: build
+
+build:
+ @npm install
+
+clean:
+ ${RM} -rf node_modules
+ ${RM} npm-debug.log
+
+install:
+ mkdir -p $(lib_prefix)/subway
+ @for i in $(INSTALL_DIR); do \
+ echo "install libs ==> $$i";\
+ $(COPY) $$i $(lib_prefix)/subway;\
+ done
+ $(COPY) config.js $(lib_prefix)/subway
+ echo "Deploying Subway"
+ mkdir -p $(bin_prefix)
+ $(INSTALL) subway $(bin_prefix)
+ chown root.root $(bin_prefix)/subway
+ sed -i "s#\./#/var/lib/subway/#" $(bin_prefix)/subway
+ mkdir -p $(log_prefix)/subway
+ touch $(log_prefix)/subway/subway.log
+ mkdir -p $(etc_prefix)/subway
+ ln -s /var/lib/subway/config.js $(etc_prefix)/subway/config.js
13 changes: 13 additions & 0 deletions debian/rules
@@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
dh $@
1 change: 1 addition & 0 deletions debian/source/format
@@ -0,0 +1 @@
3.0 (quilt)
47 changes: 47 additions & 0 deletions debian/subway.debhelper.log
@@ -0,0 +1,47 @@
dh_auto_configure
dh_auto_build
dh_auto_test
dh_prep
dh_installdirs
dh_auto_install
dh_install
dh_installdocs
dh_installchangelogs
dh_installexamples
dh_installman
dh_installcatalogs
dh_installcron
dh_installdebconf
dh_installemacsen
dh_installifupdown
dh_installinfo
dh_installinit
dh_installmenu
dh_installmime
dh_installmodules
dh_installlogcheck
dh_installlogrotate
dh_installpam
dh_installppp
dh_installudev
dh_installwm
dh_installxfonts
dh_installgsettings
dh_bugfiles
dh_ucf
dh_lintian
dh_gconf
dh_icons
dh_perl
dh_usrlocal
dh_link
dh_compress
dh_fixperms
dh_strip
dh_makeshlibs
dh_shlibdeps
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
12 changes: 12 additions & 0 deletions debian/subway.default
@@ -0,0 +1,12 @@
# Defaults for subway initscript
# sourced by /etc/init/subway.conf
# installed at /etc/default/subway by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Additional options that are passed to the Daemon.
EXEC_PATH="/usr/bin/subway"
LOG_PATH="/var/log/subway/subway.log"
NODE_ENV="production"
8 changes: 8 additions & 0 deletions debian/subway.postinst.debhelper
@@ -0,0 +1,8 @@
# Automatically added by dh_installinit
if [ -e "/etc/init/subway.conf" ]; then
invoke-rc.d subway start || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f subway remove >/dev/null || exit $?
# End automatically added section
14 changes: 14 additions & 0 deletions debian/subway.preinst.debhelper
@@ -0,0 +1,14 @@
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/subway" ] && [ ! -L "/etc/init.d/subway" ]; then
if [ "`md5sum \"/etc/init.d/subway\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' subway | sed -n -e \"\\\\' /etc/init.d/subway '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/subway has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/subway" "/etc/init.d/subway.dpkg-bak"
else
rm -f "/etc/init.d/subway"
fi
fi
fi
# End automatically added section
5 changes: 5 additions & 0 deletions debian/subway.prerm.debhelper
@@ -0,0 +1,5 @@
# Automatically added by dh_installinit
if [ -e "/etc/init/subway.conf" ]; then
invoke-rc.d subway stop || exit $?
fi
# End automatically added section
3 changes: 3 additions & 0 deletions debian/subway.substvars
@@ -0,0 +1,3 @@
misc:Depends=upstart-job
perl:Depends=perl
shlibs:Depends=libc6 (>= 2.14), libstdc++6 (>= 4.1.1)
15 changes: 15 additions & 0 deletions debian/subway.upstart
@@ -0,0 +1,15 @@
description 'subway upstart script'
author '@hoxca'

start on stopped rc or RUNLEVEL=[2345]
stop on runlevel [!2345]

instance "Subway"

respawn
respawn limit 5 60

script
. /etc/default/subway
exec sudo -u irc NODE_ENV=${NODE_ENV} /usr/bin/node ${EXEC_PATH} >> ${LOG_PATH} 2>&1
end script