Skip to content

Commit a4a24ff

Browse files
committed
Add example debian packaging.
1 parent e4e82d7 commit a4a24ff

File tree

8 files changed

+181
-18
lines changed

8 files changed

+181
-18
lines changed

packaging/debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
snm (1.0.0-1) precise; urgency=low
2+
3+
* Initial release
4+
5+
-- Jussi Lind <jussi.lind@iki.fi> Sun, 29 Dec 2013 15:16:54 +0200

packaging/debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

packaging/debian/control

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Source: snm
2+
Section: utils
3+
Priority: extra
4+
Maintainer: Jussi Lind <jussi.lind@iki.fi>
5+
Build-Depends: cdbs, debhelper (>= 7), libqt4-dev (>= 4.7)
6+
Standards-Version: 3.9.1
7+
Homepage: https://sourceforge.net/projects/simplenormalmapper
8+
9+
Package: snm
10+
Architecture: any
11+
Depends: ${misc:Depends}, ${shlibs:Depends}
12+
Description: Easy creation of normal maps
13+
Simple Normal Mapper is a normal map editor with which one can
14+
easily create normal maps for 2D images. Normal mapping is used,
15+
for example, in 2D games to make an illusion of a 3D object.
16+
.
17+
Simple Normal Mapper is fully automatic with some user-controllable
18+
parameters.
19+
.
20+
Simple Normal Mapper is written in Qt and C++.
21+

packaging/debian/copyright

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Format: http://dep.debian.net/deps/dep5
2+
Upstream-Name: simplenormalmapper
3+
Source: http://sourceforge.net/projects/simplenormalmapper
4+
5+
Files: *
6+
Copyright: 2013 Jussi Lind <jussi.lind@iki.fi>
7+
License: GPL-3.0+
8+
9+
Files: debian/*
10+
Copyright: 2013 Jussi Lind <jussi.lind@iki.fi>
11+
License: GPL-3.0+
12+
13+
License: GPL-3.0+
14+
This program is free software: you can redistribute it and/or modify
15+
it under the terms of the GNU General Public License as published by
16+
the Free Software Foundation, either version 3 of the License, or
17+
(at your option) any later version.
18+
.
19+
This package is distributed in the hope that it will be useful,
20+
but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
GNU General Public License for more details.
23+
.
24+
You should have received a copy of the GNU General Public License
25+
along with this program. If not, see <http://www.gnu.org/licenses/>.
26+
.
27+
On Debian systems, the complete text of the GNU General
28+
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
29+
30+
# Please choose a license for your packaging work. If the program you package
31+
# uses a mainstream license, using the same license is the safest choice.
32+
# Please avoid to pick license terms that are more restrictive than the
33+
# packaged work, as it may make Debian's contributions unacceptable upstream.
34+
# If you just want it to be GPL version 3, leave the following line in.
35+
36+
and is licensed under the GPL version 3, see above.
37+
38+
# Please also look if there are files or directories which have a
39+
# different copyright/license attached and list them here.

packaging/debian/docs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README

packaging/debian/rules

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/make -f
2+
# Sample debian/rules that uses debhelper.
3+
# This file is public domain software, originally written by Joey Hess.
4+
#
5+
# This version is for packages that are architecture dependent.
6+
7+
# Uncomment this to turn on verbose mode.
8+
#export DH_VERBOSE=1
9+
10+
build: build-stamp
11+
build-stamp:
12+
dh_testdir
13+
14+
# Add here commands to compile the package.
15+
DESTDIR=`pwd`/debian/`dh_listpackages` OPT=1 ./configure && $(MAKE) -j$(shell cat /proc/cpuinfo | grep processor | wc -l)
16+
touch build-stamp
17+
18+
clean:
19+
dh_testdir
20+
dh_testroot
21+
rm -f build-stamp
22+
23+
# Add here commands to clean up after the build process.
24+
dh_clean
25+
$(test -r Makefile && $MAKE clean)
26+
27+
install: build
28+
dh_testdir
29+
dh_testroot
30+
dh_prep
31+
dh_installdirs
32+
33+
# Add here commands to install the package into debian/<packagename>
34+
$(MAKE) install
35+
36+
# Build architecture-independent files here.
37+
binary-indep: build install
38+
# We have nothing to do by default.
39+
40+
# Build architecture-dependent files here.
41+
binary-arch: build install
42+
dh_testdir
43+
dh_testroot
44+
dh_installchangelogs
45+
dh_installdocs
46+
dh_installexamples
47+
# dh_install
48+
# dh_installmenu
49+
# dh_installdebconf
50+
# dh_installlogrotate
51+
# dh_installemacsen
52+
# dh_installcatalogs
53+
# dh_installpam
54+
# dh_installmime
55+
# dh_installinit
56+
# dh_installcron
57+
# dh_installinfo
58+
# dh_installwm
59+
# dh_installudev
60+
# dh_lintian
61+
# dh_bugfiles
62+
# dh_undocumented
63+
# dh_installman
64+
dh_link
65+
dh_strip
66+
dh_compress
67+
dh_fixperms
68+
# dh_perl
69+
# dh_makeshlibs
70+
dh_installdeb
71+
dh_shlibdeps
72+
dh_gencontrol
73+
dh_md5sums
74+
dh_builddeb
75+
76+
binary: binary-indep binary-arch
77+
.PHONY: build clean binary-indep binary-arch binary install
78+

scripts/updatePPA.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
VERSION=1.0.0
2+
DEBIAN_VERSION=1.0.0-1
3+
rm -rf *${VERSION}*
4+
cp ../simplenormalmapper-code/snm-$VERSION.tar.gz .
5+
mv snm-$VERSION.tar.gz snm_$VERSION.orig.tar.gz
6+
tar xzvf snm_$VERSION.orig.tar.gz
7+
cd snm-$VERSION
8+
cp -rv packaging/debian .
9+
debuild -S -sa && cd .. && dput ppa:jussi-lind/ppa "snm_${DEBIAN_VERSION}_source.changes"
10+

snm.pro

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,34 @@ RC_FILE = data/icons/Windows.rc
4848
# Install to /opt by calling "OPT=1 qmake" or to wanted prefix
4949
# by e.g. "PREFIX=/usr qmake".
5050

51-
_OPT = $$(OPT)
52-
_BIN = ""
53-
_DAT = ""
54-
if (!isEmpty(_OPT)) {
55-
message("Installs to /opt")
56-
_BIN = /opt/snm
57-
_DAT = /usr
58-
} else {
59-
# Check if PREFIX environment variable is set.
60-
# If not, then assume /usr.
61-
_PREFIX = $$(PREFIX)
62-
isEmpty(_PREFIX) {
63-
_PREFIX = /usr
51+
unix {
52+
53+
_OPT = $$(OPT)
54+
_BIN = ""
55+
_DAT = ""
56+
if (!isEmpty(_OPT)) {
57+
message("Installs to /opt")
58+
_BIN = /opt/snm
59+
_DAT = /usr
60+
} else {
61+
# Check if PREFIX environment variable is set.
62+
# If not, then assume /usr.
63+
_PREFIX = $$(PREFIX)
64+
isEmpty(_PREFIX) {
65+
_PREFIX = /usr
66+
}
67+
message("Installs to "$$_PREFIX)
68+
_BIN = $$_PREFIX
69+
_DAT = $$_PREFIX
70+
}
71+
72+
# This is for DEB/RPM packaging
73+
_DESTDIR = $$(DESTDIR)
74+
if (!isEmpty(_DESTDIR)) {
75+
_BIN = $$_DESTDIR/$$_BIN
76+
_DAT = $$_DESTDIR/$$_DAT
6477
}
65-
message("Installs to "$$_PREFIX)
66-
_BIN = $$_PREFIX
67-
_DAT = $$_PREFIX
68-
}
6978

70-
unix {
7179
target.path = $$_BIN/bin
7280
desktop.path = $$_DAT/share/applications
7381
desktop.name = snm.desktop

0 commit comments

Comments
 (0)