File: rules

package info (click to toggle)
clips 6.21-6.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,956 kB
  • ctags: 8,731
  • sloc: ansic: 97,932; makefile: 1,406; sh: 189
file content (115 lines) | stat: -rwxr-xr-x 3,763 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
111
112
113
114
115
#!/usr/bin/make -f
# Sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

# There used to be `source' and `diff' targets in this file, and many
# packages also had `changes' and `dist' targets.  These functions
# have been taken over by dpkg-source, dpkg-genchanges and
# dpkg-buildpackage in a package-independent way, and so these targets
# are obsolete.

package=clips

clipssrc/configure: clipssrc/configure.in
	cd clipssrc && autoconf
	cd clipssrc && chmod a+x ./configure ./mkinstalldirs

configure: # clipssrc/configure
	dh_testdir
	cd clipssrc && sh ./configure --prefix=$(CURDIR)/debian/clips/usr 
	touch configure

build: configure
	dh_testdir
	cd clipssrc && $(MAKE) -f Makefile clips
	touch build

x-prjct/xinterface/configure: x-prjct/xinterface/configure.in
	cd x-prjct/xinterface && autoconf

configure-x: # x-prjct/xinterface/configure
	dh_testdir
	cd x-prjct/xinterface && sh ./configure  \
		--prefix=$(CURDIR)/debian/clips/usr/ \
		--enable-xclips --with-clipssrc=../../clipssrc/ 
	cd clipssrc && sh ./configure --prefix=$(CURDIR)/debian/xclips/usr 
	touch configure-x

build-x: build configure-x
	dh_testdir
	cd x-prjct/xinterface && $(MAKE) -f Makefile xclips 
	touch build-x

clean:
	dh_testdir
	dh_testroot
	-rm -f build build-x configure configure-x
	cd clipssrc; $(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
	cd x-prjct/xinterface; $(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
	dh_clean

binary-indep:	build
	dh_testdir
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build build-x
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installdocs -pclips-common doc/*
	dh_installdirs
	dh_installexamples -pclips-common examples/*
	dh_installmenu
	dh_installcron
	dh_installmanpages -pclips debian/xclips.1x
	dh_installmanpages -pxclips debian/clips.1
	dh_installinfo
	cd clipssrc && $(MAKE) -f Makefile INSTALL_PROGRAM='install -c -s' \
		prefix=$(CURDIR)/debian/libclips/usr install-libs
	# Fix for lib files
	rm `pwd`/debian/libclips/usr/lib/libclips.a 
	rm `pwd`/debian/libclips/usr/lib/libclips.so
	cd clipssrc && $(MAKE) -f Makefile INSTALL_PROGRAM='install -c -s' \
		prefix=$(CURDIR)/debian/clips/usr install-bin
	cd clipssrc && $(MAKE) -f Makefile INSTALL_PROGRAM='install -c -s' \
		prefix=$(CURDIR)/debian/libclips-dev/usr install-includes
	install -m655 clipssrc/libclips.a `pwd`/debian/libclips-dev/usr/lib/
	cd `pwd`/debian/libclips-dev/usr/lib && ln -s libclips.so.6.21 libclips.so
	cd x-prjct/xinterface && $(MAKE) -f Makefile \
		INSTALL_PROGRAM='install -c -s' \
		prefix=$(CURDIR)/debian/xclips/usr install-bin 
	install -m644 Xclips $(CURDIR)/debian/xclips/etc/X11/app-defaults/Xclips
	# Install help
	install -m644 clips.hlp debian/clips-common/usr/share/clips
	dh_installchangelogs 
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs -V
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


# Below here is fairly generic really

binary:		binary-indep binary-arch

update-doc:
	wget  -m http://www.ghg.net/clips/CLIPS-FAQ -O doc/CLIPS-FAQ
	cd doc/html && wget -l 1 -m -k --no-parent -nd http://www.ghg.net/clips/

update-examples:
	cd examples && wget --cut-dirs=4 -nH -l 1 -m -k --no-parent -nd http://www.ghg.net/clips/download/executables/examples/
	find examples/ -name "*\?*" -exec rm -f \{\} \;

.PHONY: binary binary-arch binary-indep clean