Permalink
Browse files

Debian build infrastructure

  • Loading branch information...
1 parent 0d43283 commit 71c07e52d6928f114498579d43d17c3a33f179e0 @SokoloffA SokoloffA committed Jan 30, 2013
View
@@ -0,0 +1,5 @@
+This script will help you to build the binary or source DEB packages.
+
+USAGE
+ Just run the script. Deb packages can be found in the ~/boomaga_{VER}_deb directory.
+ See 'makeDeb.sh --help' for more information on an options.
@@ -0,0 +1,84 @@
+#!/bin/sh
+# [postinst] for boomaga
+# COPYRIGHT
+# © 2012-2013 Boomaga team https://github.com/Boomaga/boomaga
+# Alexander Sokoloff <sokoloff.a@gmail.com>
+#
+# Based on [postinst] for cups-pdf
+#
+# COPYRIGHT
+# © 2003-2011 Martin-Éric Racine <martin-eric.racine@iki.fi>
+# © 2009,2011 Till Kamppeter <till.kamppeter@gmail.com>
+#
+# LICENSE
+# This package 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 of the License or (at
+# your option) any later version.
+#
+set -e
+case "$1" in
+ configure)
+ # Remove lint from possible upgrades.
+ #rm -rf /var/spool/boomaga/SPOOL
+ # Sanitize ownerships and permissions.
+ chmod 0700 /usr/lib/cups/backend/boomaga
+ #if ! [ -f /var/log/cups/boomaga_log ]
+ #then
+ # touch /var/log/cups/boomaga_log
+ #fi
+ #chown -R root:lpadmin /var/log/cups
+ #chmod 0640 /var/log/cups/boomaga_log*
+ #chown root:lpadmin /var/spool/boomaga/ANONYMOUS
+ #chmod 1777 /var/spool/boomaga/ANONYMOUS
+ # Ensure that CUPS is running before we manipulate its queues.
+ if [ -f /etc/init.d/cups ]
+ then
+ invoke-rc.d cups force-reload || invoke-rc.d cups start || :
+ fi
+ # Wait until CUPS has reloaded its configuration.
+ if lpstat -h localhost -r 2>/dev/null | grep -q not; then
+ t=0
+ while lpstat -h localhost -r 2>/dev/null | grep -q not; do
+ t=$(($t + 1))
+ if [ $t = 10 ]; then
+ echo "CUPS failed to reload its configuration!"
+ break
+ fi
+ sleep 1
+ done
+ fi
+ # Create a queue if we have none yet.
+ if [ -z "$(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 'boomaga:/')" ]
+ then
+ # 1) Find a name for the queue.
+ queue=Boomaga
+ number=0
+ while $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | cut -d ':' -f 1 | cut -d ' ' -f 3 | grep -q ^$queue\$)
+ do
+ number=$(($number + 1))
+ queue="Boomaga-$number"
+ done
+ # 2) Find the default paper size.
+ size="$(LC_ALL=C paperconf 2>/dev/null)" || size=a4
+ # 3) Create the queue.
+ echo | lpadmin -h localhost -p $queue -v boomaga:/ -m lsb/usr/boomaga/boomaga.ppd -o printer-is-shared=no -o PageSize=$size 2>/dev/null || :
+ # 4) Enable the queue.
+ echo | cupsenable -h localhost $queue 2>/dev/null || :
+ echo | cupsaccept -h localhost $queue 2>/dev/null || :
+ # 5) Set the queue as default if there is no default printer yet.
+ if [ -z "$(LC_ALL=C lpstat -h localhost -d 2>/dev/null | grep 'system default destination:')" ]
+ then
+ echo | lpadmin -h localhost -d $queue 2>/dev/null || :
+ fi
+ fi
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+#DEBHELPER#
+exit 0
@@ -0,0 +1,63 @@
+#!/bin/sh
+# [postrm] for boomaga
+# COPYRIGHT
+# © 2012-2013 Boomaga team https://github.com/Boomaga/boomaga
+# Alexander Sokoloff <sokoloff.a@gmail.com>
+#
+# Based on [postrm] for cups-pdf
+#
+# COPYRIGHT
+# © 2003-2011 Martin-Éric Racine <martin-eric.racine@iki.fi>
+# © 2009,2011 Till Kamppeter <till.kamppeter@gmail.com>
+#
+# LICENSE
+# This package 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 of the License or (at
+# your option) any later version.
+#
+set -e
+case "$1" in
+ purge|abort-install)
+ if [ -f /var/log/cups/boomaga_log ]
+ then
+ rm /var/log/cups/boomaga_log*
+ fi
+ if [ -d /var/spool/boomaga ]
+ then
+ rm -rf /var/spool/boomaga
+ fi
+ # Ensure that CUPS is running before we manipulate its queues.
+ if [ -f /etc/init.d/cups ]
+ then
+ invoke-rc.d cups force-reload || invoke-rc.d cups start || :
+ fi
+ # Wait until CUPS has reloaded its configuration.
+ if lpstat -h localhost -r 2>/dev/null | grep -q not; then
+ t=0
+ while lpstat -h localhost -r 2>/dev/null | grep -q not; do
+ t=$(($t + 1))
+ if [ $t = 10 ]; then
+ echo "CUPS failed to reload its configuration!"
+ break
+ fi
+ sleep 1
+ done
+ fi
+ # Purge all queues and disable them.
+ for queue in $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 'boomaga:/' | cut -d ':' -f 1 | cut -d ' ' -f 3)
+ do
+ echo | cupsreject -h localhost $queue 2>/dev/null || :
+ echo | cupsdisable -h localhost $queue 2>/dev/null || :
+ echo | lpadmin -h localhost -x $queue 2>/dev/null || :
+ done
+ ;;
+ abort-upgrade|upgrade|failed-upgrade|remove|disappear)
+ ;;
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+#DEBHELPER#
+exit 0
@@ -0,0 +1,8 @@
+%if DISTRIB Ubuntu
+%NAME% (%VERSION%-1%RELEASE%) %RELEASE%; urgency=low
+%else
+%NAME% (%VERSION%-1) %RELEASE%; urgency=low
+%endif
+ * New program release
+
+ -- %DEBFULLNAME% <%DEBEMAIL%> %DATE%
View
@@ -0,0 +1 @@
+7
View
@@ -0,0 +1,27 @@
+%ifnot RELEASE lucid maverick lenny etch squeeze
+ %set MULTIARCH yes
+%endif
+Source: boomaga
+Section: utils
+Priority: extra
+Maintainer: Alexander Sokolov <sokoloff.a@gmail.com>
+Build-Depends: pkg-config,
+%if MULTIARCH yes
+ debhelper (>= 8.0.0~),
+ dpkg-dev (>= 1.16.0~),
+%else
+ debhelper (>= 7.0.50~),
+%endif
+ cmake,
+ libqt4-dev (>= 4.6.0),
+ libcups2-dev,
+ libgs-dev
+Standards-Version: 3.9.1
+Homepage: https://github.com/Boomaga/boomaga
+
+Package: boomaga
+Architecture: any
+Depends: cups, ${shlibs:Depends}, ${misc:Depends}
+Description: Post-processing backend for CUPS
+ Boomaga provides a virtual printer for CUPS. This can be used for
+ print preview or for print booklets.
View
@@ -0,0 +1,52 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Boomaga
+Upstream-Contact: Alexander Sokolov <sokoloff.a@gmail.com>
+Source: https://github.com/Boomaga/boomaga
+
+License: LGPL-2.1+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ .
+ This library 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
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the complete text of the GNU Lesser General Public
+ License can be found in the file `/usr/share/common-licenses/LGPL-2.1'.
+
+License: GPL-2+
+ This program 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 of the License, or
+ (at your option) any later version.
+ .
+ This program 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; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in the file /usr/share/common-licenses/GPL-2'.
+
+
+
+Files: *
+Copyright: 2012-2013 Boomaga team
+License: LGPL-2.1+
+
+
+Files: gui/third-party/libspectre/*
+Copyright: (C) 1992 Timothy O. Theisen
+Copyright: (C) 2004 Jose E. Marchesi
+License: GPL-2+
View
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+%ifnot RELEASE lucid maverick lenny etch squeeze
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+%endif
+
+# the -Wl,--as-needed will fail under lenny/etch, umm i dont care stupid winbuntu but added for razorqt happy team..
+%ifnot RELEASE lucid maverick lenny etch squeeze
+#export DEB_BUILD_MAINT_OPTIONS := hardening=+all
+export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
+%endif
+# CMake doesn't use CPPFLAGS, pass them to CFLAGS/CXXFLAGS instead (bug #662833)
+%ifnot RELEASE lucid lenny etch
+export DEB_CFLAGS_MAINT_APPEND := -pipe -Wall $(shell dpkg-buildflags --get CPPFLAGS)
+export DEB_CXXFLAGS_MAINT_APPEND := -pipe -Wall $(shell dpkg-buildflags --get CPPFLAGS)
+%endif
+
+
+%:
+# dh $@ --buildsystem=cmake --parallel
+%ifnot RELEASE lucid maverick lenny etch
+ dh $@ --buildsystem=cmake
+%endif
+%if RELEASE lucid maverick lenny etch
+ dh $@
+%endif
+
+%ifnot RELEASE lucid maverick lenny etch squeeze
+override_dh_auto_configure:
+ dh_auto_configure -- -DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)"
+%endif
+
Oops, something went wrong.

0 comments on commit 71c07e5

Please sign in to comment.