~ubuntu-branches/ubuntu/oneiric/bugzilla/oneiric

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2009-11-29 13:56:03 UTC
  • mfrom: (9.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20091129135603-yn5lbfhxxvz8jvjo
Tags: 3.2.5.1-2
Fixed dash compatibility within ../bugzilla3/lib/checksetup.pl.
Closes: #558238

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# Destination paths
6
6
# For a better maintenance, we'll create by hand each
7
7
# bugzilla's sub directories.
8
 
DESTDIR         = 
 
8
DESTDIR         = $(PWD)
9
9
BUGZILLA_PERLDIR= $(DESTDIR)/usr/share/perl5
10
10
BUGZILLA_CONFIG = $(DESTDIR)/etc/bugzilla3
11
 
BUGZILLA_CGIDIR = $(DESTDIR)/usr/lib/cgi-bin/bugzilla3
12
11
BUGZILLA_ROOT   = $(DESTDIR)/usr/share/bugzilla3
13
12
BUGZILLA_WWW    = $(BUGZILLA_ROOT)/web
 
13
BUGZILLA_CGIDIR  = $(BUGZILLA_WWW)
14
14
BUGZILLA_LIBDIR = $(BUGZILLA_ROOT)
15
 
BUGZILLA_DATADIR = $(DESTDIR)/var/lib/bugzilla3
 
15
BUGZILLA_VARDIR = $(DESTDIR)/var/lib/bugzilla3
 
16
BUGZILLA_DATADIR = $(DESTDIR)/var/lib/bugzilla3/data
16
17
BUGZILLA_CONTRIB= $(BUGZILLA_ROOT)/contrib
17
18
 
18
 
PKGVER := $(shell dpkg-parsechangelog |grep Version |sed -e 's,Version: \([^-]\+\).*,\1,g')
 
19
PKGVER := $(shell dpkg-parsechangelog |grep Version: |sed -e 's,Version: \([^-]\+\).*,\1,g')
19
20
ORIGTARGZ := bugzilla_$(PKGVER).orig.tar.gz
20
21
 
21
22
# Source paths
22
23
cgi_files       = *.cgi
23
24
lib_files       = *.pm 
24
25
pl_files        = runtests.pl 
25
 
lib_perlscripts = checksetup.pl collectstats.pl email_in.pl importxml.pl mod_perl.pl testserver.pl whineatnews.pl whine.pl
 
26
lib_perlscripts = checksetup.pl collectstats.pl email_in.pl importxml.pl mod_perl.pl testserver.pl whineatnews.pl whine.pl sanitycheck.pl
26
27
lib_dir         = Bugzilla
27
28
static_files    = *.dtd *.txt 
28
29
 
29
30
# Where to find the sources.
30
 
BUGZILLA_TAR    := $(shell ls -1 bugzilla-?.?.tar.gz bugzilla-?.?.?.tar.gz| head -n 1)
 
31
BUGZILLA_TAR    := $(shell ls -1 bugzilla-?.?.tar.gz bugzilla-?.?.?.tar.gz bugzilla-?.?.??.tar.gz 2>/dev/null| head -n 1)
31
32
BUGZILLA_TARDIR := $(subst .tar.gz,,$(BUGZILLA_TAR))
32
33
BUGZILLA_SRCDIR = bugzilla-srcdir
33
34
 
34
35
BUGZILLA_DE = $(shell ls -1 germzilla-*.tar.gz | head -n 1)
35
36
BUGZILLA_BE = $(shell ls -1 bugzilla-be-*.tar.gz | head -n 1)
36
 
#BUGZILLA_BG = $(shell ls -1 bugzilla-bg-*.tar.gz | head -n 1)
 
37
BUGZILLA_BG = $(shell ls -1 bugzilla-bg-*.tar.bz2 | head -n 1)
37
38
BUGZILLA_FR = $(shell ls -1 bugzilla-*.fr.tar.gz | head -n 1)
38
39
BUGZILLA_RU = $(shell ls -1 bugzilla-*-ru-*.tar.gz | head -n 1)
39
40
BUGZILLA_CS = $(shell ls -1 bugzilla.cs.*.tar.gz | head -n 1)
47
48
        tar -xzf $(BUGZILLA_TAR)
48
49
        test -d $(BUGZILLA_TARDIR)
49
50
        tar -C $(BUGZILLA_TARDIR)/template -xzf $(BUGZILLA_DE)
50
 
        test -d $(BUGZILLA_TARDIR)/template/de
 
51
        test -d $(BUGZILLA_TARDIR)/template/de/default
51
52
        find $(BUGZILLA_TARDIR)/template/de -name gzversion.html.tmpl -exec cp /dev/null {} \;
52
53
        tar -C $(BUGZILLA_TARDIR) -xzf $(BUGZILLA_FR)
53
 
        test -d $(BUGZILLA_TARDIR)/template/fr
54
 
        : # tar -C $(BUGZILLA_TARDIR) -xzf $(BUGZILLA_BG)
55
 
        : # test -d $(BUGZILLA_TARDIR)/template/bg
 
54
        test -d $(BUGZILLA_TARDIR)/template/fr/default
56
55
        tar -C $(BUGZILLA_TARDIR) --transform "s/bugzilla[^\/]\+\///g" -xzf $(BUGZILLA_BE)
57
 
        test -d $(BUGZILLA_TARDIR)/template/be
 
56
        test -d $(BUGZILLA_TARDIR)/template/be/default
58
57
        tar -C $(BUGZILLA_TARDIR) -xzf $(BUGZILLA_RU)
59
 
        test -d $(BUGZILLA_TARDIR)/template/ru
 
58
        test -d $(BUGZILLA_TARDIR)/template/ru/default
 
59
        tar -C $(BUGZILLA_TARDIR) -xjf $(BUGZILLA_BG)
 
60
        test -d $(BUGZILLA_TARDIR)/template/bg/default
60
61
        tar -C $(BUGZILLA_TARDIR)/template --transform "s/template/cs/g" -xzf $(BUGZILLA_CS)
61
 
        test -d $(BUGZILLA_TARDIR)/template/cs
 
62
        test -d $(BUGZILLA_TARDIR)/template/cs/default
62
63
        $(INSTALL) -d $(BUGZILLA_TARDIR)/template/ja
63
64
        tar -C $(BUGZILLA_TARDIR)/template/ja -xjf $(BUGZILLA_JA)
64
65
        test -d $(BUGZILLA_TARDIR)/template/ja/default
65
66
        tar -C $(BUGZILLA_TARDIR) -xzf $(BUGZILLA_ZH)
66
 
        test -d $(BUGZILLA_TARDIR)/template/zh-TW
 
67
        test -d $(BUGZILLA_TARDIR)/template/zh-TW/default
67
68
        find $(BUGZILLA_TARDIR)/template -name "*.tmpl" -exec chmod a-x {} \;
68
69
        find $(BUGZILLA_TARDIR)/template -name ".cvsignore" -or -name "CVS" -or -name ".svn" -exec rm {} \;
69
70
        mv $(BUGZILLA_TARDIR) $(BUGZILLA_SRCDIR)
79
80
 
80
81
 
81
82
install_contrib:        extractsrc
82
 
        $(INSTALL) -d $(BUGZILLA_CONTRIB)
83
 
        $(INSTALL) -m 0755 $(BUGZILLA_SRCDIR)/contrib/recode.pl $(BUGZILLA_CONTRIB)
84
 
#       $(INSTALL) -m 0755 $(BUGZILLA_SRCDIR)/contrib/*.pl $(BUGZILLA_CONTRIB)
85
 
#       $(INSTALL) -m 0644 $(BUGZILLA_SRCDIR)/contrib/*.pm $(BUGZILLA_CONTRIB)
86
 
#       $(INSTALL) -m 0755 $(BUGZILLA_SRCDIR)/contrib/*.py $(BUGZILLA_CONTRIB)
87
 
#       $(INSTALL) -m 0644 $(BUGZILLA_SRCDIR)/contrib/README* $(BUGZILLA_CONTRIB)
88
 
#       $(INSTALL) -m 0644 $(BUGZILLA_SRCDIR)/contrib/*.html $(BUGZILLA_CONTRIB)
89
 
#       $(INSTALL) -m 0755 $(BUGZILLA_SRCDIR)/contrib/*.sh $(BUGZILLA_CONTRIB)
90
 
#       $(INSTALL) -m 0755 $(BUGZILLA_SRCDIR)/contrib/*.rb $(BUGZILLA_CONTRIB)
91
 
#       $(INSTALL) -d $(BUGZILLA_CONTRIB)/bugzilla-submit
92
 
#       cp $(BUGZILLA_SRCDIR)/contrib/bugzilla-submit/* $(BUGZILLA_CONTRIB)/bugzilla-submit
93
 
#       $(INSTALL) -d $(BUGZILLA_CONTRIB)/cmdline
94
 
#       cp $(BUGZILLA_SRCDIR)/contrib/cmdline/* $(BUGZILLA_CONTRIB)/cmdline
95
 
#       $(INSTALL) -d $(BUGZILLA_CONTRIB)/gnatsparse
96
 
#       $(INSTALL) -m 0644 $(BUGZILLA_SRCDIR)/contrib/gnatsparse/README $(BUGZILLA_CONTRIB)/gnatsparse
97
 
#       $(INSTALL) -m 0755 $(BUGZILLA_SRCDIR)/contrib/gnatsparse/*.py $(BUGZILLA_CONTRIB)/gnatsparse
98
 
 
 
83
        mkdir -p $(BUGZILLA_CONTRIB)
 
84
        cp -av $(BUGZILLA_SRCDIR)/contrib/* $(BUGZILLA_CONTRIB)
 
85
        find $(BUGZILLA_CONTRIB) -name '*.pl' -exec chmod a+x {} \;
 
86
        find $(BUGZILLA_CONTRIB) -name '*.sh' -exec chmod a+x {} \;
99
87
 
100
88
install_static_dirs:    extractsrc
101
 
        @cd $(BUGZILLA_SRCDIR) && for this_dir in `find skins -type d` ; do \
102
 
                install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
103
 
        done
104
 
        @cd $(BUGZILLA_SRCDIR) && for this_dir in `find js -type d` ; do \
105
 
                install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
106
 
        done
107
 
        @cd $(BUGZILLA_SRCDIR) && for this_dir in `find data -type d` duplicates webdot; do \
108
 
                install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)/$$this_dir ;\
 
89
        cd $(BUGZILLA_SRCDIR) && for this_dir in `find skins -type d` ; do \
 
90
                $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
 
91
        done
 
92
        cd $(BUGZILLA_SRCDIR) && for this_dir in `find js -type d` ; do \
 
93
                $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
 
94
        done
 
95
        cd $(BUGZILLA_SRCDIR) && for this_dir in `find data -type d` duplicates webdot; do \
 
96
                $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)/$$this_dir ;\
109
97
        done
110
98
 
111
99
 
112
100
install_template:       extractsrc
113
 
        @cd $(BUGZILLA_SRCDIR) && for this_dir in `find template -type d` ; do \
114
 
                install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)/$$this_dir ;\
 
101
        cd $(BUGZILLA_SRCDIR) && for this_dir in `find template -type d` ; do \
 
102
                $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_VARDIR)/$$this_dir ;\
115
103
        done
116
 
        @cd $(BUGZILLA_SRCDIR) && for this_file in `find template -type f` ; do \
117
 
                install -m 0644 -o root -g root $$this_file $(BUGZILLA_DATADIR)/`dirname $$this_file` ;\
 
104
        cd $(BUGZILLA_SRCDIR) && for this_file in `find template -type f` ; do \
 
105
                $(INSTALL) -m 0644 -o root -g root $$this_file $(BUGZILLA_VARDIR)/`dirname $$this_file` ;\
118
106
        done
119
107
 
120
108
 
121
109
install_static_files:   extractsrc
122
 
        $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)
123
110
        cd $(BUGZILLA_SRCDIR) && $(INSTALL) -m 0644 -o root -g root $(static_files) $(BUGZILLA_WWW)
124
 
        @cd $(BUGZILLA_SRCDIR) && for this_file in `find skins -type f` ; do \
125
 
                install -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
 
111
        cd $(BUGZILLA_SRCDIR) && for this_file in `find skins -type f` ; do \
 
112
                $(INSTALL) -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
126
113
        done
127
114
        $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_WWW)
128
115
        $(INSTALL) -m 0644 -o root -g root $(BUGZILLA_SRCDIR)/images/padlock.png $(BUGZILLA_WWW)
129
 
        @cd $(BUGZILLA_SRCDIR) && for this_file in `find js -type f` ; do \
130
 
                install -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
131
 
        done
132
 
        # The tricky point here, is to leave "params" alone, that's a conffile now 
133
 
        # We'll handle it by hand in postinst.
134
 
        @cd $(BUGZILLA_SRCDIR) && for this_file in `find data -type f -name '!params'` ; do \
135
 
                install -m 0644 -o root -g root $$this_file $(BUGZILLA_DATADIR)/`dirname $$this_file` ;\
136
 
        done
137
 
        @cd $(BUGZILLA_SRCDIR) && for this_file in `find skins -type f` ; do \
138
 
                install -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
 
116
        cd $(BUGZILLA_SRCDIR) && for this_file in `find js -type f` ; do \
 
117
                $(INSTALL) -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
 
118
        done
 
119
        cd $(BUGZILLA_SRCDIR) && for this_file in `find skins -type f` ; do \
 
120
                $(INSTALL) -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
139
121
        done
140
122
 
141
123
 
145
127
        $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_ROOT)/lib
146
128
        cd $(BUGZILLA_SRCDIR) && $(INSTALL) -m 0755 -o root -g root $(lib_perlscripts) $(BUGZILLA_ROOT)/lib
147
129
        $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_PERLDIR)
148
 
        @cd $(BUGZILLA_SRCDIR) && for this_dir in `find $(lib_dir) -type d` ; do \
149
 
                install -d -m 0755 -o root -g root $(BUGZILLA_PERLDIR)/$$this_dir ;\
150
 
        done
151
 
        @cd $(BUGZILLA_SRCDIR) && for this_file in `find $(lib_dir) -type f` ; do \
152
 
                install -m 0644 -o root -g root $$this_file $(BUGZILLA_PERLDIR)/`dirname $$this_file` ;\
153
 
        done
154
 
        $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)
 
130
        cd $(BUGZILLA_SRCDIR) && for this_dir in `find $(lib_dir) -type d` ; do \
 
131
                $(INSTALL) -d -m 0755 -o root -g root $(BUGZILLA_PERLDIR)/$$this_dir ;\
 
132
        done
 
133
        cd $(BUGZILLA_SRCDIR) && for this_file in `find $(lib_dir) -type f` ; do \
 
134
                $(INSTALL) -m 0644 -o root -g root $$this_file $(BUGZILLA_PERLDIR)/`dirname $$this_file` ;\
 
135
        done
155
136
 
156
137
 
157
138
install_cgi:    extractsrc
162
143
clean:
163
144
        rm -rf $(BUGZILLA_TARDIR) $(BUGZILLA_SRCDIR) bugzilla-srcdir
164
145
 
 
146
 
165
147
orig:   ../$(ORIGTARGZ)
166
148
../$(ORIGTARGZ):
167
 
        tar -czf ../$(ORIGTARGZ) Makefile *.gz *.bz2
 
149
        tar -czf ../$(ORIGTARGZ) *.tar*
 
150
 
168
151
 
169
152
deb:    orig
170
153
        dpkg-buildpackage -rfakeroot -us -uc