debian/rules
author greg
Tue, 26 Feb 2008 10:26:00 +0100
changeset 408 f85552acc2bf
parent 373 fc32e8a796ae
child 531 f912f8d26e98
permissions -rwxr-xr-x
fixed bug to open pdf with acrobat reader on Win32 in objdictedit and networkedit
346
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     1
#!/usr/bin/make -f
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     2
# -*- makefile -*-
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     3
# Sample debian/rules that uses debhelper.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     4
#
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     5
# This file was originally written by Joey Hess and Craig Small.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     6
# As a special exception, when this file is copied by dh-make into a
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     7
# dh-make output file, you may use that output file without restriction.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     8
# This special exception was added by Craig Small in version 0.37 of dh-make.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
     9
#
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    10
# Modified to make a template file for a multi-binary package with separated
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    11
# build-arch and build-indep targets  by Bill Allombert 2001
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    12
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    13
# Uncomment this to turn on verbose mode.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    14
export DH_VERBOSE=1
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    15
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    16
# This has to be exported to make some magic below work.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    17
export DH_OPTIONS
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    18
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    19
CFLAGS = -Wall -g
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    20
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    21
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    22
	CFLAGS += -O0
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    23
else
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    24
	CFLAGS += -O2
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    25
endif
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    26
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    27
config.status: configure
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    28
	#### CONFIG.STATUS ####	
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    29
	dh_testdir
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    30
	# Add here commands to configure the package.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    31
	cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    32
	./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    33
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    34
##############
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    35
# And now the simple things for dpatch. Here we only apply/unapply the patches.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    36
# You can do more things with dpatch, like having patches only applied on
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    37
# a special architecture - see the non-dh version of the sample for this!
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    38
patch: patch-stamp
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    39
patch-stamp:
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    40
	dpatch apply-all
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    41
	dpatch cat-all >patch-stamp
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    42
	touch patch-stamp
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    43
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    44
unpatch:
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    45
	dpatch deapply-all
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    46
	rm -rf patch-stamp debian/patched
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    47
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    48
##################
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    49
#Architecture 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    50
build: build-arch build-indep
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    51
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    52
build-arch: build-arch-stamp
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    53
build-arch-stamp:  config.status patch
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    54
	#### BUILD-ARCH-STAMP ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    55
	# Add here commands to compile the arch part of the package.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    56
	$(MAKE) 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    57
	touch $@
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    58
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    59
build-indep: build-indep-stamp
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    60
build-indep-stamp:  config.status
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    61
	#### BUILD-INDEP-STAMP ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    62
	# Add here commands to compile the indep part of the package.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    63
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    64
clean: unpatch
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    65
	#### CLEAN ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    66
	dh_testdir
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    67
	dh_testroot
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    68
	rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    69
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    70
	# Add here commands to clean up after the build process.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    71
	-$(MAKE) clean
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    72
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    73
	cp -f /usr/share/misc/config.sub config.sub
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    74
endif
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    75
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    76
	cp -f /usr/share/misc/config.guess config.guess
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    77
endif
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    78
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    79
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    80
	dh_clean 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    81
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    82
install: install-indep install-arch
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    83
install-indep:
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    84
	#### INSTALL-INDEP ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    85
	dh_testdir
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    86
	dh_testroot
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    87
	dh_clean -k -i 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    88
	dh_installdirs -i
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    89
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    90
	# Add here commands to install the indep part of the package into
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    91
	# debian/<package>-doc.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    92
	
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    93
	dh_install -i --sourcedir=debian/canfestival
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    94
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    95
install-arch:
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    96
	#### INSTALL-ARCH ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    97
	dh_testdir
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    98
	dh_testroot
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
    99
	dh_clean -k -s 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   100
	dh_installdirs -s
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   101
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   102
	# Add here commands to install the arch part of the package into 
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   103
	# debian/tmp.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   104
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   105
	$(MAKE) -C src PREFIX=$(CURDIR)/debian/canfestival/usr install	
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   106
	$(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install
373
fc32e8a796ae fix install target in example Makefile.in
greg
parents: 371
diff changeset
   107
	$(MAKE) -C examples PREFIX=$(CURDIR)/debian/canfestival/usr install
346
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   108
	$(MAKE) -C objdictgen PREFIX=$(CURDIR)/debian/canfestival/usr/share install
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   109
	cp debian/objdictedit.desktop $(CURDIR)/debian/canfestival/usr/share/applications/objdictedit.desktop
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   110
	cp debian/objdictedit.png $(CURDIR)/debian/canfestival/usr/share/objdictgen/objdictedit.png
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   111
	dh_install -s
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   112
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   113
# Must not depend on anything. This is to be called by
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   114
# binary-arch/binary-indep
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   115
# in another 'make' thread.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   116
binary-common:
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   117
	#### BINARY-COMMON ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   118
	dh_testdir
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   119
	dh_testroot
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   120
	dh_installchangelogs CHANGES
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   121
	dh_installdocs
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   122
#	dh_installexamples
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   123
#	dh_installmenu
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   124
#	dh_installdebconf	
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   125
#	dh_installlogrotate	
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   126
#	dh_installemacsen
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   127
#	dh_installpam
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   128
#	dh_installmime
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   129
#	dh_python
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   130
#	dh_installinit
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   131
#	dh_installcron
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   132
#	dh_installinfo
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   133
#	dh_installman
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   134
	dh_link
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   135
	dh_strip
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   136
	dh_compress
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   137
	dh_fixperms
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   138
#	dh_perl
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   139
#	dh_makeshlibs
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   140
	dh_installdeb
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   141
#	dh_shlibdeps -l /usr/lib
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   142
	dh_gencontrol
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   143
	dh_md5sums
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   144
	dh_builddeb
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   145
# Build architecture independant packages using the common target.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   146
binary-indep: build-indep install-indep
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   147
	#### BINARY-INDEP ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   148
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   149
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   150
# Build architecture dependant packages using the common target.
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   151
binary-arch: build-arch install-arch
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   152
	#### BINARY-ARCH ####
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   153
	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   154
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   155
binary: binary-arch binary-indep
59dbdcc99264 add debian directory to create debian binary packages
greg
parents:
diff changeset
   156
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch patch unpatch