/[ascend]/trunk/debian/rules
ViewVC logotype

Annotation of /trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1421 - (hide annotations) (download)
Wed Apr 25 13:25:37 2007 UTC (17 years, 6 months ago) by jpye
File size: 2302 byte(s)
Adding support for .desktop files in .deb pkg
1 jpye 1396 #!/usr/bin/make -f
2     # -*- makefile -*-
3    
4     CFLAGS = -Wall -g
5 jpye 1413 SCONS_OPTIONS = CC="ccache gcc" CXX="ccache g++" INSTALL_PREFIX=/usr -j2
6 jpye 1396 SCONS= scons $(SCONS_OPTIONS)
7    
8     ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
9     CFLAGS += -O0
10     else
11     CFLAGS += -O2
12     endif
13    
14     ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
15     INSTALL_PROGRAM += -s
16     endif
17    
18     # shared library versions, option 1
19     major=0
20    
21 jpye 1421 INSTALLROOT=$(CURDIR)/debian/tmp
22     DATADIR=$(INSTALLROOT)/usr/share
23    
24 jpye 1396 build: build-stamp
25     build-stamp:
26     dh_testdir
27 jpye 1413 cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models
28     cd $(CURDIR) && $(SCONS) doc/book.pdf
29 jpye 1396 touch build-stamp
30    
31     clean:
32     dh_testdir
33     rm -f build-stamp
34     -cd $(CURDIR) && $(SCONS) -c
35 jpye 1413 find $(CURDIR) -name ".scon*" | xargs rm -rf
36     find $(CURDIR) -type f -name "*.pyc" | xargs rm -rf
37     find $(CURDIR) -type f -name "*.pyo" | xargs rm -rf
38     find $(CURDIR) -type f -name "*.o" | xargs rm -rf
39     find $(CURDIR) -type f -name "*.os" | xargs rm -rf
40     find $(CURDIR) -type f -name "*.a" | xargs rm -rf
41     -rm $(CURDIR)/doc/*.tex
42     -rm -rf $(CURDIR)/doc/html
43     # dh_testroot
44 jpye 1396 dh_clean
45    
46     install: build
47     dh_testdir
48 jpye 1413 # dh_testroot
49 jpye 1396 dh_clean -k
50     dh_installdirs
51 jpye 1421 mkdir -p $(INSTALLROOT)/usr
52     cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(INSTALLROOT) install
53     #
54     cd $(CURDIR)/pygtk/gnome &&
55     install -m 644 -D ascend.desktop $(INSTALLROOT)$(DATADIR)/applications/ascend.desktop &&
56     install -m 644 -D ascend.png $(INSTALLROOT)$(DATADIR)/icons/ascend-app.png &&
57     install -m 644 -D ascend.png $(INSTALLROOT)$(DATADIR)/icons/hicolor/64x64/ascend.png &&
58     install -m 644 -D ascend.xml $(CURDIR)/debian/ascend.mime
59     #
60 jpye 1413 dh_install --autodest
61 jpye 1421 dh_desktop
62     dh_installmime
63 jpye 1418 dh_installman debian/ascend.man
64     dh_installman debian/ascend4.man
65     dh_installman debian/ascend-config.man
66 jpye 1396
67     # Build architecture-independent files here.
68     binary-indep:
69     dh_testdir
70     dh_testroot
71     -cd $(CUR_DIR) && $(SCONS) doc
72    
73     # Build architecture-dependent files here.
74     binary-arch: build install
75     dh_testdir
76     dh_testroot
77     dh_installchangelogs CHANGELOG.txt
78     dh_installdocs
79     dh_installexamples
80     dh_installman
81     dh_link
82     dh_strip
83     dh_compress
84     dh_fixperms
85     dh_makeshlibs
86     dh_installdeb
87 jpye 1413 dh_shlibdeps -L ascend -l debian/ascend/usr/lib
88 jpye 1396 dh_gencontrol
89     dh_md5sums
90     dh_builddeb
91    
92     binary: binary-indep binary-arch
93     .PHONY: build clean binary-indep binary-arch binary install configure
94    

Properties

Name Value
svn:executable *

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22