os/debian/rules
author matthijs
Wed, 03 Sep 2008 17:18:04 +0000
changeset 10070 8970f1074f21
parent 10069 891d75deeb73
child 10098 de9c1bd521c8
permissions -rwxr-xr-x
(svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
- Packaging files are now identical to those of the official 0.6.2-1 (or,
r11138 in the collab-maint subversion repository), with the following
exceptions:
- Desktop files are removed, since openttd trunk installs them already.
- Changes regarding package names from r14237 are preserved.
- Topmost changelog entry with version 0.7~svn-1 is added.
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     1
#!/usr/bin/make -f
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     2
# -*- makefile -*-
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     3
# Sample debian/rules that uses debhelper.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     4
# GNU copyright 1997 to 1999 by Joey Hess.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     5
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     6
# Uncomment this to turn on verbose mode.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     7
#export DH_VERBOSE=1
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
     8
10069
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
     9
DEFAULT_PACKAGE := openttd
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    10
# Find the package name from the topmost changelog entry.
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    11
# Is this the best way to do this?
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    12
PACKAGE = $(shell cat debian/changelog | head -1 | cut -f1 -d' ')
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    13
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    14
debian/control:
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    15
	# Generate control file
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    16
	sed 's/PACKAGE/$(PACKAGE)/' debian/control.in > debian/control
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    17
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    18
	# TODO: How to do this using makefile conditionals?
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    19
	if [ "$(PACKAGE)" != "$(DEFAULT_PACKAGE)" ]; then \
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    20
		echo "Provides: $(DEFAULT_PACKAGE)" >> debian/control ; \
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    21
		echo "Conflicts: $(DEFAULT_PACKAGE)" >> debian/control ; \
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    22
	fi;
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    23
10070
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
    24
configure: debian/control configure-stamp
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    25
configure-stamp:
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    26
	dh_testdir
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    27
	# Add here commands to configure the package.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    28
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    29
	touch configure-stamp
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    30
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    31
10069
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    32
build: debian/control configure build-stamp
5356
0d5d19f88ad1 (svn r7533) -Codechange [Debian]: Update debian packaging files
matthijs
parents: 3170
diff changeset
    33
build-stamp:
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    34
	dh_testdir
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    35
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    36
	# Add here commands to compile the package.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    37
	
10069
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    38
	./configure --prefix-dir=/usr --binary-dir=games --data-dir=share/games/openttd --icon-dir=share/pixmaps --personal-dir=.openttd --install-dir=debian/$(PACKAGE)
5484
7ad86e421c42 (svn r7768) -Fix (r7765): use $(MAKE) instead of make in the debian rules.
rubidium
parents: 5481
diff changeset
    39
	$(MAKE)
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    40
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    41
	#/usr/bin/docbook-to-man debian/openttd.sgml > openttd.1
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    42
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    43
	touch build-stamp
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    44
10070
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
    45
clean: debian/control
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    46
	dh_testdir
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    47
	dh_testroot
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    48
	rm -f build-stamp configure-stamp
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    49
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    50
	# Add here commands to clean up after the build process.
10070
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
    51
	# We check for Makefile presence, because clean is called at the
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
    52
	# start of the build process (before configure) where we don't
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
    53
	# have a Makefile yet.
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
    54
	[ ! -f Makefile ] || $(MAKE) distclean
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    55
5356
0d5d19f88ad1 (svn r7533) -Codechange [Debian]: Update debian packaging files
matthijs
parents: 3170
diff changeset
    56
	dh_clean
10069
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    57
	# Clean up generated control file
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    58
	-rm debian/control
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    59
10069
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    60
install: debian/control build
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    61
	dh_testdir
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    62
	dh_testroot
5356
0d5d19f88ad1 (svn r7533) -Codechange [Debian]: Update debian packaging files
matthijs
parents: 3170
diff changeset
    63
	dh_clean -k
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    64
	dh_installdirs
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    65
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    66
	# Add here commands to install the package into debian/openttd.
5481
c194404a46b0 (svn r7765) -Fix (r7759): forgot to update the os/debian files.
rubidium
parents: 5356
diff changeset
    67
	$(MAKE) install
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    68
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    69
# Build architecture-independent files here.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    70
binary-indep: build install
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    71
# We have nothing to do by default.
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    72
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    73
# Build architecture-dependent files here.
10069
891d75deeb73 (svn r14237) -Feature [Debian]: Allow the Debian packaging to change the package name of the resulting package.
matthijs
parents: 7267
diff changeset
    74
binary-arch: debian/control build install
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    75
	dh_testdir
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    76
	dh_testroot
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    77
	dh_installchangelogs changelog.txt
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    78
	dh_installdocs
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    79
	dh_installexamples
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    80
#	dh_install
1143
5879a8637190 (svn r1644) - Some minor corrections to the os/debian dir.
matthijs
parents: 680
diff changeset
    81
	dh_installmenu
3170
3740e285e4df (svn r3801) * Update debian packaging files to the ones used for releasing 0.4.5 (see os/debian/changelog for details).
matthijs
parents: 1865
diff changeset
    82
	dh_installdebconf
285
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    83
#	dh_installlogrotate
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    84
#	dh_installemacsen
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    85
#	dh_installpam
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    86
#	dh_installmime
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    87
#	dh_installinit
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    88
#	dh_installcron
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    89
#	dh_installinfo
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    90
	dh_installman docs/openttd.6
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    91
	dh_link
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    92
	dh_strip
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    93
	dh_compress
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    94
	dh_fixperms
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    95
#	dh_perl
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    96
#	dh_python
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    97
#	dh_makeshlibs
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    98
	dh_installdeb
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
    99
	dh_shlibdeps
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
   100
	dh_gencontrol
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
   101
	dh_md5sums
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
   102
	dh_builddeb
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
   103
cf5213c8a919 (svn r291) Minor fix to english.txt
bjarni
parents:
diff changeset
   104
binary: binary-indep binary-arch
10070
8970f1074f21 (svn r14238) -Change [Debian]: Update Debian packaging files to the latest official Debian version.
matthijs
parents: 10069
diff changeset
   105
.PHONY: build clean binary-indep binary-arch binary install configure