File: rules

package info (click to toggle)
gimp-plugin-registry 5.20120621
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 56,020 kB
  • sloc: ansic: 46,068; lisp: 20,560; python: 14,495; sh: 3,294; cpp: 2,528; makefile: 1,041; xml: 546
file content (129 lines) | stat: -rwxr-xr-x 3,306 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/quilt/quilt.make

CFLAGS = -Wall -g -fPIC
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

include tools.mk

DESTDIR := $(CURDIR)/debian/gimp-plugin-registry

debian/control: $(VERSION_FILES) $(DESC_FILES) debian/control.in
	$(MAKE) -f debian/rules update-control

debian/copyright: $(COPYRIGHT_FILES) debian/copyright.in
	$(MAKE) -f debian/rules update-copyright
	

build: build-stamp

build-stamp: $(QUILT_STAMPFN)
	dh_testdir

	for plugin in $(PLUGINS); do \
	    $(MAKE) -C $$plugin CFLAGS="$(CFLAGS)" GIMPVER="$(GIMPVER)" build  || exit 1 ;\
	done

	touch $@

clean: clean-patched debian/control debian/copyright
clean-patched: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	-for plugin in $(PLUGINS); do \
	    $(MAKE) -C $$plugin GIMPVER="$(GIMPVER)" clean ;\
	done

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	for plugin in `echo $(PLUGINS) | sed 's,gimp-fx-foundry,,;s,^,gimp-fx-foundry ,'`; do \
		$(MAKE) -C $$plugin DESTDIR=$(DESTDIR) \
                                    PLUGINBINDIR=/usr/lib/gimp/2.0/plug-ins  \
	                            PLUGINSCRIPTDIR=/usr/share/gimp/2.0/scripts \
				    DOCDIR=/usr/share/doc/gimp-plugin-registry/$$plugin \
	                            GIMPVER="$(GIMPVER)" \
                                    install || exit 1 ;\
		for readme in README README.Debian; do \
	          if [ -r $$plugin/$$readme ]; then \
                    install -m 755 -d $(DESTDIR)/usr/share/doc/gimp-plugin-registry/$$plugin ;\
	            cp -L $$plugin/$$readme $(DESTDIR)/usr/share/doc/gimp-plugin-registry/$$plugin ;\
	          fi ;\
		done ;\
	done


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps -l/usr/lib/lapack:/usr/lib/libblas
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure \
        update-all update-copyright update-control 


#### the following stuff is not needed to build the package,
#### it's only for lazy maintainers.

update-all: update-control update-copyright

update-copyright:
	( cat debian/copyright.in ;\
	  for plugin in $(PLUGINS); do \
	      echo; echo ;\
	      echo '************************************************************' ;\
	      echo "$$plugin:" ;\
	      echo ;\
	      if [ -f $$plugin/url ]; then \
	        echo "The plugin was downloaded from:" ;\
	        cat $$plugin/url ;\
	        echo ;\
	      fi ;\
	      sed 's,^,  ,;s,^ *$$,,g' $$plugin/copyright ;\
	  done ;\
	) > debian/copyright

update-control:
	( cat debian/control.in ;\
	  for plugin in $(PLUGINS); do \
	    if [ -f $$plugin/version ]; then \
	      p_version=`cat $$plugin/version` ;\
	      sed "s%{version}%($$p_version)%g" $$plugin/description ;\
	    else \
	      cat $$plugin/description ;\
	    fi | grep '[a-zA-Z]' | sed 's%^%   %';\
	  done ;\
	) > debian/control