Skip to content

Commit 0e4806c

Browse files
committed
Debian/Ubuntu packaging files
This patch adds new files and changes existing config files to add autoconf/automake support for Debian/Ubuntu packaging files. In other words, this patch adds the support to generate a .deb package for ginger. To test it, running in a Debian/Ubuntu system: ./autogen.sh --system make make deb The ginger .deb package file should be generated in the root dir of the plug-in. Signed-off-by: Daniel Henrique Barboza <[email protected]>
1 parent 23ded96 commit 0e4806c

File tree

7 files changed

+87
-1
lines changed

7 files changed

+87
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ po/pt_BR.gmo
2525
po/stamp-po
2626
po/zh_CN.gmo
2727
rpm
28+
contrib/make-deb.sh
29+
contrib/DEBIAN/control

Makefile.am

+10-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# License along with this library; if not, write to the Free Software
1818
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919

20-
SUBDIRS= po controls models ui
20+
SUBDIRS= po controls models ui contrib
2121

2222
ACLOCAL_AMFLAGS = --install -I m4
2323

@@ -57,6 +57,15 @@ check-local:
5757
$(PEP8) --version
5858
$(PEP8) --filename '*.py,*.py.in' $(PEP8_WHITELIST)
5959

60+
#
61+
# Packaging helpers
62+
#
63+
install-deb: install
64+
cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/
65+
66+
deb: contrib/make-deb.sh
67+
$(top_srcdir)/contrib/make-deb.sh
68+
6069

6170
# Link built mo files in the source tree to enable use of translations from
6271
# within the source tree

configure.ac

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ AC_CONFIG_FILES([
6666
ui/pages/help/en_US/Makefile
6767
ui/pages/help/pt_BR/Makefile
6868
ui/pages/help/zh_CN/Makefile
69+
contrib/Makefile
70+
contrib/DEBIAN/Makefile
71+
contrib/DEBIAN/control
6972
],[
7073
chmod +x po/gen-pot
7174
])

contrib/DEBIAN/Makefile.am

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright IBM Corp, 2014
2+
#
3+
# This library is free software; you can redistribute it and/or
4+
# modify it under the terms of the GNU Lesser General Public
5+
# License as published by the Free Software Foundation; either
6+
# version 2.1 of the License, or (at your option) any later version.
7+
#
8+
# This library is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
# Lesser General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Lesser General Public
14+
# License along with this library; if not, write to the Free Software
15+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16+
17+
CLEANFILES = control

contrib/DEBIAN/control.in

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Package: @PACKAGE_NAME@
2+
Version: @PACKAGE_VERSION@
3+
Section: base
4+
Priority: optional
5+
Architecture: all
6+
Depends: kimchi,
7+
python-libuser
8+
Maintainer: Daniel Henrique Barboza <[email protected]>
9+
Description: Ginger plug-in for Kimchi web server

contrib/Makefile.am

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright IBM Corp, 2014
2+
#
3+
# This library is free software; you can redistribute it and/or
4+
# modify it under the terms of the GNU Lesser General Public
5+
# License as published by the Free Software Foundation; either
6+
# version 2.1 of the License, or (at your option) any later version.
7+
#
8+
# This library is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
# Lesser General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Lesser General Public
14+
# License along with this library; if not, write to the Free Software
15+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16+
17+
SUBDIRS = DEBIAN
18+
19+
EXTRA_DIST = \
20+
make-deb.sh.in \
21+
$(NULL)
22+
23+
make-deb.sh: make-deb.sh.in $(top_builddir)/config.status
24+
$(AM_V_GEN)sed \
25+
-e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
26+
-e 's|[@]PACKAGE_RELEASE[@]|$(PACKAGE_RELEASE)|g' \
27+
< $< > $@-t && \
28+
chmod a+x $@-t && \
29+
mv $@-t $@
30+
BUILT_SOURCES = make-deb.sh
31+
32+
CLEANFILES = make-deb.sh

contrib/make-deb.sh.in

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
VERSION="@PACKAGE_VERSION@"
4+
RELEASE="@PACKAGE_RELEASE@"
5+
6+
if [ ! -f configure ]; then
7+
echo "Please run this script from the top of the package tree"
8+
exit 1
9+
fi
10+
11+
TMPDIR=`mktemp -d`
12+
make DESTDIR=$TMPDIR install-deb
13+
dpkg-deb -b $TMPDIR ginger-${VERSION}-${RELEASE}.noarch.deb
14+
rm -rf $TMPDIR

0 commit comments

Comments
 (0)