debian/rules
author etisserant
Mon, 15 Dec 2008 17:23:48 +0100
changeset 159 1e4eb0d48385
parent 106 0fff950e578e
child 171 59f5197b088a
permissions -rwxr-xr-x
Try to clean Makefile. Not a real success.
106
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     1
#!/usr/bin/make -f
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     2
# -*- makefile -*-
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     3
# Sample debian/rules that uses debhelper.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     4
# This file was originally written by Joey Hess and Craig Small.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     5
# As a special exception, when this file is copied by dh-make into a
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     6
# dh-make output file, you may use that output file without restriction.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     7
# This special exception was added by Craig Small in version 0.37 of dh-make.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     8
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
     9
# Uncomment this to turn on verbose mode.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    10
export DH_VERBOSE=1
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    11
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    12
CFLAGS = -Wall -g
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    13
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    14
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    15
	CFLAGS += -O0
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    16
else
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    17
	CFLAGS += -O2
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    18
endif
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    19
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    20
configure: configure-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    21
configure-stamp:
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    22
	dh_testdir
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    23
	# Add here commands to configure the package.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    24
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    25
	touch configure-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    26
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    27
##############
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    28
# And now the simple things for dpatch. Here we only apply/unapply the patches.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    29
# You can do more things with dpatch, like having patches only applied on
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    30
# a special architecture - see the non-dh version of the sample for this!
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    31
patch: patch-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    32
patch-stamp:
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    33
	dpatch apply-all
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    34
	dpatch cat-all >patch-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    35
	touch patch-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    36
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    37
unpatch:
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    38
	dpatch deapply-all
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    39
	rm -rf patch-stamp debian/patched
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    40
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    41
build: build-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    42
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    43
build-stamp: configure-stamp patch
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    44
	dh_testdir
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    45
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    46
	# Add here commands to compile the package.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    47
	$(MAKE)
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    48
	#docbook-to-man debian/matiec.sgml > matiec.1
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    49
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    50
	touch $@
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    51
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    52
clean: unpatch
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    53
	dh_testdir
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    54
	dh_testroot
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    55
	rm -f build-stamp configure-stamp
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    56
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    57
	# Add here commands to clean up after the build process.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    58
	-$(MAKE) clean
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    59
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    60
	dh_clean 
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    61
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    62
install: build
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    63
	dh_testdir
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    64
	dh_testroot
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    65
	dh_clean -k 
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    66
	dh_installdirs
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    67
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    68
	# Add here commands to install the package into debian/matiec.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    69
	$(MAKE) INSTALL_PREDIR=$(CURDIR)/debian/matiec/usr INSTALL_BINDIR=/bin IECLIBDIR=/lib install	
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    70
	
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    71
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    72
# Build architecture-independent files here.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    73
binary-indep: build install
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    74
# We have nothing to do by default.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    75
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    76
# Build architecture-dependent files here.
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    77
binary-arch: build install
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    78
	dh_testdir
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    79
	dh_testroot
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    80
	dh_installchangelogs 
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    81
	dh_installdocs
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    82
	dh_installexamples
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    83
#	dh_install
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    84
#	dh_installmenu
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    85
#	dh_installdebconf	
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    86
#	dh_installlogrotate
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    87
#	dh_installemacsen
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    88
#	dh_installpam
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    89
#	dh_installmime
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    90
#	dh_python
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    91
#	dh_installinit
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    92
#	dh_installcron
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    93
#	dh_installinfo
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    94
	dh_installman
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    95
	dh_link
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    96
	dh_strip
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    97
	dh_compress
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    98
	dh_fixperms
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
    99
#	dh_perl
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   100
#	dh_makeshlibs
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   101
	dh_installdeb
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   102
	dh_shlibdeps
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   103
	dh_gencontrol
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   104
	dh_md5sums
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   105
	dh_builddeb
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   106
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   107
binary: binary-indep binary-arch
0fff950e578e add debian dir to create debian package
greg
parents:
diff changeset
   108
.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch