From e7ad7a13fb9a3d0fd8439202464ab4c73684255e Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Fri, 2 May 2008 13:32:19 +0200 Subject: [PATCH] Add initial packaging --- debian/changelog | 6 + debian/compat | 1 + debian/control | 18 +++ debian/copyright | 22 ++++ debian/dirs | 2 + debian/docs | 2 + debian/rules | 111 ++++++++++++++++++ debian/scalable-opengroupware.org-dev.install | 2 + debian/scalable-opengroupware.org.dirs | 3 + debian/scalable-opengroupware.org.init | 97 +++++++++++++++ debian/scalable-opengroupware.org.install | 8 ++ debian/scalable-opengroupware.org.postinst | 10 ++ 12 files changed, 282 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 debian/scalable-opengroupware.org-dev.install create mode 100644 debian/scalable-opengroupware.org.dirs create mode 100755 debian/scalable-opengroupware.org.init create mode 100644 debian/scalable-opengroupware.org.install create mode 100644 debian/scalable-opengroupware.org.postinst diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..96148d3c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +scalable-opengroupware.org (0.1-1) unstable; urgency=low + + * Initial release + + -- Tollef Fog Heen Fri, 25 Apr 2008 13:20:30 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7ed6ff82 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..a61d77d5 --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: scalable-opengroupware.org +Section: unknown +Priority: extra +Maintainer: root +Build-Depends: debhelper (>= 5), autotools-dev +Standards-Version: 3.7.2 + +Package: scalable-opengroupware.org +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Description: + + +Package: scalable-opengroupware.org-dev +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: - devel package + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..9e27c69f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,22 @@ +This package was debianized by root on +Fri, 25 Apr 2008 13:20:30 +0200. + +It was downloaded from + +Upstream Author: + +Copyright: + +License: + + + + +The Debian packaging is (C) 2008, root and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 00000000..ca882bbb --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..50bd824b --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +NEWS +README diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..82642d37 --- /dev/null +++ b/debian/rules @@ -0,0 +1,111 @@ +#!/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 + +GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles +GNUSTEP_SETUP=$(GNUSTEP_MAKEFILES)/GNUstep.sh + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + GNUSTEP_MAKEFILES=$(GNUSTEP_MAKEFILES) . $(GNUSTEP_SETUP) && GNUSTEP_LOCAL_ROOT=$$GNUSTEP_SYSTEM_ROOT ./configure --with-gnustep --disable-strip --enable-debug + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + GNUSTEP_MAKEFILES=$(GNUSTEP_MAKEFILES) . $(GNUSTEP_SETUP) && $(MAKE) messages=y + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + GNUSTEP_MAKEFILES=$(GNUSTEP_MAKEFILES) . $(GNUSTEP_SETUP) && $(MAKE) distclean || true +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/scalable-opengroupware.org. + GNUSTEP_MAKEFILES=$(GNUSTEP_MAKEFILES) . $(GNUSTEP_SETUP) && $(MAKE) \ + DESTDIR=$(CURDIR)/debian/tmp \ + GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ + install + cp -a UI/WebServerResources UI/Templates \ + debian/tmp/usr/lib/GNUstep/SOGo-0.9 + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_install --list-missing --sourcedir=debian/tmp + dh_installdirs +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python + dh_installinit -pscalable-opengroupware.org +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/scalable-opengroupware.org-dev.install b/debian/scalable-opengroupware.org-dev.install new file mode 100644 index 00000000..bfed8943 --- /dev/null +++ b/debian/scalable-opengroupware.org-dev.install @@ -0,0 +1,2 @@ +usr/include/GNUstep +usr/lib/lib*.so diff --git a/debian/scalable-opengroupware.org.dirs b/debian/scalable-opengroupware.org.dirs new file mode 100644 index 00000000..36dca78c --- /dev/null +++ b/debian/scalable-opengroupware.org.dirs @@ -0,0 +1,3 @@ +/var/run/sogo +/var/spool/sogo +/var/log/sogo diff --git a/debian/scalable-opengroupware.org.init b/debian/scalable-opengroupware.org.init new file mode 100755 index 00000000..9669800b --- /dev/null +++ b/debian/scalable-opengroupware.org.init @@ -0,0 +1,97 @@ +#! /bin/bash + +# SOGo init script for Debian GNU/Linux +# +# Copyright (C) 2007 Inverse groupe conseil +# +# Author: Wolfgang Sourdeau +# Ludovic Marcotte +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# specify more if you are using a load-balancer +PREFORK=1 + +SOGO_ARGS="" + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +DAEMON=/usr/sbin/sogod-0.9 +NAME=sogo +DESC="Scalable OpenGroupware.Org" + +PIDFILE=/var/run/sogo/sogod. + +GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles +. $GNUSTEP_MAKEFILES/GNUstep.sh + +if [ -f /etc/default/sogo ]; then + . /etc/default/sogo +fi + +if [ ! -x $DAEMON ]; then + echo "$DAEMON is not executable." + exit 1 +fi + +install -d -o sogo /var/run/sogo + +if [ ! -d /var/run/sogo ] || [ `/usr/bin/stat /var/run/sogo -c %U` != "sogo" ]; then + echo "/var/run/sogo is not owned by the sogo user." + exit 1 +fi + +if [ ! -d /var/spool/sogo ] || [ `/usr/bin/stat /var/spool/sogo -c %U` != "sogo" ]; then + echo "/var/spool/sogo is not owned by the sogo user." + exit 1 +fi + +if [ ! -d /var/log/sogo ] || [ `/usr/bin/stat /var/log/sogo -c %U` != "sogo" ]; then + echo "/var/log/sogo is not owned by the sogo user." + exit 1 +fi + +case "$1" in + start) + echo -n "Starting $DESC: " + for ((a=1; a <= PREFORK ; a++)) + do + start-stop-daemon -c sogo --pidfile $PIDFILE$a \ + -b --start --quiet --exec $DAEMON $a + done + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + for ((a=1; a <= PREFORK ; a++)) + do + start-stop-daemon --pidfile $PIDFILE$a \ + --stop --quiet --exec $DAEMON + done + echo "$NAME." + ;; + restart|force-reload) + $0 stop && sleep 2 && $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/debian/scalable-opengroupware.org.install b/debian/scalable-opengroupware.org.install new file mode 100644 index 00000000..432d46db --- /dev/null +++ b/debian/scalable-opengroupware.org.install @@ -0,0 +1,8 @@ +usr/bin +usr/sbin +usr/lib/GNUstep/OCSTypeModels +usr/lib/GNUstep/SaxDrivers-4.7 +usr/lib/GNUstep/SaxMappings +usr/lib/GNUstep/SOGo-0.9 +usr/lib/lib*.so.* +usr/lib/GNUstep/WOxElemBuilders-4.7/SOGoElements.wox diff --git a/debian/scalable-opengroupware.org.postinst b/debian/scalable-opengroupware.org.postinst new file mode 100644 index 00000000..2215e8f9 --- /dev/null +++ b/debian/scalable-opengroupware.org.postinst @@ -0,0 +1,10 @@ +#! /bin/sh -e + +if [ -z "$2" ]; then + adduser --system sogo + + install -d -o sogo /var/spool/sogo + install -d -o sogo /var/log/sogo +fi + +#DEBHELPER# -- 2.39.5