File: rules

package info (click to toggle)
pybliographer 1.2.12-4squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,560 kB
  • ctags: 1,413
  • sloc: python: 9,817; xml: 2,560; sh: 813; makefile: 621
file content (129 lines) | stat: -rwxr-xr-x 3,302 bytes parent folder | download | duplicates (2)
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
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

# This is the debhelper compatability version to use.
export SHELL=/bin/bash -e

CFLAGS := -g
INSTALL_PROGRAM := install

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
#ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
#	INSTALL_PROGRAM += -s
#endif

d	= debian/pybliographer
p	= pybliographer
pwd	:= $(shell pwd)

configure: configure-stamp
configure-stamp:
	dh_testdir
	DISPLAY="" CFLAGS="$(CFLAGS)" INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
		/bin/bash configure \
		--prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f recode-stamp build-stamp install-stamp configure-stamp
	 [ ! -f Makefile ] || $(MAKE) distclean
	-find scripts -type l -exec rm -f {} \;
	-find . -name 'pyblio.junk' -exec rm -rf {} \;
	-find doc -name '*.html' -exec rm -f {} \;
	-find . -name '*.py[co]' -exec rm -f {} \;
	-find . -name '*.mo' -exec  rm -f {} \;
	rm -f compiled/Setup.tmp etc/installer Pyblio/version.py \
		po/pybliographer.pot scripts/pybscript pybliographer \
		pybliographic.keys config.log
	rm -rf recode-3.5 recode-3.5.tar.gz
	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install DESTDIR=`pwd`/$(d)
	mv $(d)/usr/bin/pybtex $(d)/usr/bin/bibtex.pybliographer

	find $(d) -name '*.py[co]' | xargs rm -f
	#find $(d) \( -name '*.gif' -o -name '*.css' \) | xargs chmod 644
	rm -f $(d)/usr/lib/*.{a,la,so}
	for i in $(d)/usr/share/pybliographer/*.py; do \
	  sed 's,^#! @bin_dir@/,#! /usr/bin/,' $$i > $$i.x; \
	  if cmp --quiet $$i $$i.x; then \
	    sed 's,^#! /usr/local/,#! /usr/,' $$i > $$i.x; \
	    if cmp --quiet $$i $$i.x; then \
	      rm -f $$i.x; \
	    else \
	      mv -f $$i.x $$i; \
	    fi; \
	  else \
	    mv -f $$i.x $$i; \
	  fi; \
	  chmod +x $$i; \
	done
	chmod -x $(d)/usr/share/pybliographer/*.py
	touch install-stamp

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

# Build architecture-independent files here.
binary-indep: build install
#	dh_testversion
	dh_testdir
	dh_testroot
#	dh_installdebconf	
	dh_installdocs AUTHORS README TODO
	dh_installexamples
	dh_installman
#	dh_installinfo
	dh_installchangelogs NEWS

	#mv `pwd`/$(d)/usr/share/gnome/help/pybliographer \
	#		`pwd`/$(d)/usr/share/doc/pybliographer/html
	#/bin/sh debian/scripts/changer .gif .png \
	#	$(d)/usr/share/doc/pybliographer/html/*/*.html
	#dh_link usr/share/doc/pybliographer/html \
	#	usr/share/gnome/help/pybliographer
	rm -f $(d)/usr/share/applications/mimeinfo.cache
	mkdir -p $(d)/usr/share/bug/pybliographer
	cp debian/presubj $(d)/usr/share/bug/pybliographer

	cp debian/pybliographic.xpm $(d)/usr/share/pixmaps
	dh_installmenu
	dh_installmime
	dh_pysupport
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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