/[metamod]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2871 - (show annotations) (download)
Thu Nov 5 18:25:25 2015 UTC (4 years, 9 months ago) by geira
File size: 2618 byte(s)
added carton runtime to source to aid bootstrapping
removed PG_HOST from createusers as won't work remotely anyway
1 #
2 # Makefile that is used when generating the Debian package
3 #
4
5 PACKAGENAME = metno-metamod-2.14
6
7 OSVERSION := $(shell lsb_release -rs)
8
9 DEBIANDIR = $(CURDIR)/debian/$(PACKAGENAME)
10
11 DESTDIR = $(DEBIANDIR)/opt/$(PACKAGENAME)
12
13 BUILDDIR = $(CURDIR)/lib-build
14
15 # this only works locally, not when checked out from svn
16 VERSION: debian/changelog
17 debian/checkVersion.pl -u
18
19 LIBDEPS="local/lib/perl5:local/lib/perl5/x86_64-linux-gnu-thread-multi"
20
21 .PHONY: test
22 # so "make test" is not dependent of the "test" directory
23 test:
24 PERL5LIB="local/lib/perl5:local/lib/perl5/x86_64-linux-gnu-thread-multi" ./run_automatic_tests.pl
25
26 apidocs:
27 mkdir -p docs/html/api
28 perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go \
29 "catalyst/lib:common/lib:base/scripts:common/scripts:virtualenv:lsconf" \
30 docs/html/api
31 cp docs/apidocs.css docs/html/api/_blkbluw.css
32 # ok, the last one is a hack... write perl script later
33
34 # needs to maintain different snapshot files per OS version - FIXME
35 cpanfile.snapshot:
36 ln -s cpanfile.snapshot.$(OSVERSION) cpanfile.snapshot
37
38 deps: cpanfile.snapshot
39 vendor/bin/carton install
40
41 bundle: cpanfile.snapshot
42 vendor/bin/carton bundle --no-fatpack
43
44 deployment: cpanfile.snapshot
45 vendor/bin/carton install --deployment --cached
46
47 # Build the actual debian package
48 # It is a requirement that this should not produce any svn diffs
49 debian_package: deployment apidocs
50 debian/checkVersion.pl -u
51
52 fakeroot mkdir -p $(DESTDIR)
53
54 fakeroot rsync -aC $(CURDIR)/app/* $(DESTDIR)/app
55 fakeroot rsync -aC $(CURDIR)/base/* $(DESTDIR)/base
56 fakeroot rsync -aC $(CURDIR)/catalyst/* $(DESTDIR)/catalyst
57 fakeroot rsync -aC $(CURDIR)/common/* $(DESTDIR)/common
58 fakeroot rsync -aC $(CURDIR)/docs/* $(DESTDIR)/docs
59 fakeroot rsync -aC $(CURDIR)/harvest/* $(DESTDIR)/harvest
60 fakeroot rsync -aC $(CURDIR)/upload/* $(DESTDIR)/upload
61 fakeroot rsync -aC $(CURDIR)/thredds/* $(DESTDIR)/thredds
62 fakeroot rsync -a $(CURDIR)/local/* $(DESTDIR)/local
63 fakeroot rsync -aC $(CURDIR)/activate_env $(DESTDIR)/
64 fakeroot rsync -aC $(CURDIR)/LICENCE $(DESTDIR)/
65 fakeroot rsync -aC $(CURDIR)/README $(DESTDIR)/
66 fakeroot rsync -aC $(CURDIR)/VERSION $(DESTDIR)/
67 fakeroot rsync -aC $(CURDIR)/install_jobs.sh $(DESTDIR)/
68 fakeroot rsync -aC $(CURDIR)/lsconf $(DESTDIR)/
69 fakeroot rsync -aC $(CURDIR)/virtualenv.pl $(DESTDIR)/
70
71 fakeroot dh_fixperms
72 fakeroot dh_gencontrol
73 fakeroot dh_md5sums
74
75 dpkg-deb --build debian/$(PACKAGENAME) .
76 dpkg-genchanges -b -u. > ./$(PACKAGENAME).changes
77
78 # Cleanup everything done by 'debian_package'
79 debian_clean:
80 rm -f *.changes
81 rm -f *.deb
82 rm -f $(CURDIR)/debian/files
83 rm -rf $(DESTDIR)

svn@met.no
ViewVC Help
Powered by ViewVC 1.1.5