File: rules

package info (click to toggle)
gretl 0.99.2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,304 kB
  • ctags: 3,210
  • sloc: ansic: 43,338; sh: 6,567; makefile: 807; perl: 529
file content (110 lines) | stat: -rwxr-xr-x 3,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/make -f 					
# 							-*- makefile -*-
# debian/rules file for the Debian/GNU Linux gretl package
# Copyright 2000 by Dirk Eddelbuettel <edd@debian.org>

package := $(shell head -1 debian/changelog | awk '{print $$1}')
sonum   := 0
libpack := libgretl$(sonum)
devpack := $(libpack)-dev
debtmp	:= $(CURDIR)/debian/$(package)

arch 	:= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

#export DH_VERBOSE=1
export DH_COMPAT=3

upstream: get-orig-source
get-orig-source:
	lynx http://gretl.sourceforge.net

build: build-stamp
build-stamp:
	dh_testdir
	./configure	--prefix=/usr			\
			--with-gnome-install=/usr	\
			--enable-static			\
			--enable-shared			\
			--host $(arch)
	$(MAKE) CC=gcc CFLAGS="-O2 -Wall -D_REENTRANT" 
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) -i distclean || $(MAKE) -i -f Makefile.in distclean
	-(cd gui && make cleanall)
	dh_clean build-stamp install-stamp 

install: build install-stamp 
install-stamp: 
	$(MAKE) -f debian/rules DH_OPTIONS= install-work
install-work:
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs	
	dh_installdirs -p$(package) 	usr/share/gnome/apps/Applications \
					usr/share/pixmaps
	$(MAKE) prefix=$(debtmp)/usr 			\
		gnome_prefix=$(debtmp)/usr 		\
		mandir=$(debtmp)/usr/share/man		install
        #	infodir=$(debtmp)/usr/share/info	\
        # dh_undocumented		gretl.1 gretlcli.1 gretl_x11.1
        # move static libs into dev-package  and binaries into bin package
	dh_movefiles 		--sourcedir=debian/$(package) \
				 -p$(devpack) -p$(libpack)
        # clean extra COPYING file
	(cd $(debtmp)/usr/share/$(package); \
		ln -svf ../common-licenses/GPL COPYING)
	touch install-stamp

# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common: build install 
	dh_testdir
	dh_testroot
        #dh_installdebconf
	dh_link			
	dh_installdocs		-p$(package) 	README EXTENDING TODO \
						doc/
	dh_installexamples      -p$(package)	utils/ extra/
	dh_installmenu
        #dh_installemacsen
        #dh_installpam
        #dh_installinit
        #dh_installcron
        #dh_installman		gretl.1
        #dh_installinfo
        #dh_undocumented
	dh_installchangelogs			ChangeLog
	dh_compress
	dh_fixperms
	dh_strip
        #dh_suidregister
	dh_makeshlibs 	
	dh_installdeb
        #dh_perl
	dh_shlibdeps	-l debian/$(libpack)/usr/lib/
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture independant packages using the common target.
binary-indep: build install
# (Uncomment this next line if you have such packages.)
        # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build install
	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

# Any other binary targets build just one binary package at a time.
binary-%: build install
	make -f debian/rules binary-common DH_OPTIONS=-p$*

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install