1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
# ubuntu_05_makefile_install.dpatch
3
# by Jonathan Patrick Davies <jpds@ubuntu.com>
5
# DP: Provide a nice way of install necessary files for bugzilla.
8
--- ./Makefile 2008-04-22 19:49:52.000000000 +0200
9
+++ ./Makefile 2008-05-30 21:04:15.000000000 +0200
11
+# Makefile written for the Debian package of bugzilla.
12
+# Modified by Jonathan Patrick Davies <jpds@ubuntu.com>
14
+# Based on the Remi Perrot's one, done for
18
+# For a better maintenance, we'll create by hand each
19
+# bugzilla's sub directories.
21
+BUGZILLA_PERLDIR= $(DESTDIR)/usr/share/perl5
22
+BUGZILLA_CONFIG = $(DESTDIR)/etc/bugzilla
23
+BUGZILLA_CGIDIR = $(DESTDIR)/usr/lib/cgi-bin/bugzilla
24
+BUGZILLA_ROOT = $(DESTDIR)/usr/share/bugzilla
25
+BUGZILLA_WWW = $(BUGZILLA_ROOT)/web
26
+BUGZILLA_LIBDIR = $(BUGZILLA_ROOT)
27
+BUGZILLA_DATADIR = $(DESTDIR)/var/lib/bugzilla
28
+BUGZILLA_CONTRIB= $(BUGZILLA_ROOT)/contrib
33
+pl_files = runtests.pl
34
+lib_perlscripts = checksetup.pl collectstats.pl email_in.pl importxml.pl testserver.pl whineatnews.pl whine.pl
36
+static_files = *.dtd *.js *.txt
37
+config_files = debian/default-files/localconfig debian/default-files/index.html
39
+install: install_static_dirs install_static_files install_lib_files \
40
+ install_cgi install_config install_template install_contrib
43
+ install -d $(BUGZILLA_CONTRIB)
44
+ install -m 0755 contrib/*.pl $(BUGZILLA_CONTRIB)
45
+ install -m 0755 contrib/*.py $(BUGZILLA_CONTRIB)
46
+ install -m 0644 contrib/README* $(BUGZILLA_CONTRIB)
47
+ install -m 0755 contrib/*.sh $(BUGZILLA_CONTRIB)
48
+ install -m 0755 contrib/*.rb $(BUGZILLA_CONTRIB)
49
+ install -d $(BUGZILLA_CONTRIB)/bugzilla-submit
50
+ cp contrib/bugzilla-submit/* $(BUGZILLA_CONTRIB)/bugzilla-submit
51
+ install -d $(BUGZILLA_CONTRIB)/cmdline
52
+ cp contrib/cmdline/* $(BUGZILLA_CONTRIB)/cmdline
53
+ install -d $(BUGZILLA_CONTRIB)/gnatsparse
54
+ install -m 0644 contrib/gnatsparse/README $(BUGZILLA_CONTRIB)/gnatsparse
55
+ install -m 0755 contrib/gnatsparse/*.py $(BUGZILLA_CONTRIB)/gnatsparse
58
+ @for this_dir in $(shell find skins -type d) ; do \
59
+ install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
61
+ @for this_dir in $(shell find js -type d) ; do \
62
+ install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
64
+ mkdir -p data/duplicates
65
+ mkdir -p data/webdot
66
+ @for this_dir in $(shell find data -type d) ; do \
67
+ install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)/$$this_dir ;\
69
+ @for this_dir in $(shell find skins -type d) ; do \
70
+ install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
74
+ @for this_dir in $(shell find template -type d) ; do \
75
+ install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)/$$this_dir ;\
77
+ @for this_file in $(shell find template -type f) ; do \
78
+ install -m 0644 -o root -g root $$this_file $(BUGZILLA_DATADIR)/`dirname $$this_file` ;\
82
+install_static_files:
83
+ install -d -m 0755 -o root -g root $(BUGZILLA_WWW)
84
+ install -m 0644 -o root -g root $(static_files) $(BUGZILLA_WWW)
85
+ @for this_file in $(shell find skins -type f) ; do \
86
+ install -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
88
+ install -m 0644 -o root -g root images/padlock.png $(BUGZILLA_WWW)
89
+ @for this_file in $(shell find js -type f) ; do \
90
+ install -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
92
+ # The tricky point here, is to leave "params" alone, that's a conffile now
93
+ # We'll handle it by hand in postinst.
94
+ @for this_file in $(shell find data -type f -name '!params') ; do \
95
+ install -m 0644 -o root -g root $$this_file $(BUGZILLA_DATADIR)/`dirname $$this_file` ;\
97
+ @for this_file in $(shell find skins -type f) ; do \
98
+ install -m 0644 -o root -g root $$this_file $(BUGZILLA_WWW)/`dirname $$this_file` ;\
102
+ install -m 0644 -o root -g root $(lib_files) $(BUGZILLA_ROOT)
103
+ install -m 0755 -o root -g root $(pl_files) $(BUGZILLA_ROOT)
104
+ install -d -m 0755 -o root -g root $(BUGZILLA_ROOT)/lib
105
+ install -m 0755 -o root -g root $(lib_perlscripts) $(BUGZILLA_ROOT)/lib
106
+ install -d -m 0755 -o root -g root $(BUGZILLA_PERLDIR)
107
+ @for this_dir in $(shell find Bugzilla -type d) ; do \
108
+ install -d -m 0755 -o root -g root $(BUGZILLA_PERLDIR)/$$this_dir ;\
110
+ @for this_file in $(shell find Bugzilla -type f) ; do \
111
+ install -m 0644 -o root -g root $$this_file $(BUGZILLA_PERLDIR)/`dirname $$this_file` ;\
113
+ install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)
116
+ install -d -m 0755 -o root -g root $(BUGZILLA_CGIDIR)
117
+ install -m 0755 -o root -g root $(cgi_files) $(BUGZILLA_CGIDIR)
120
+ install -d -m 0755 -o root -g root $(BUGZILLA_CONFIG)
121
+ install -m 0644 -o root -g root $(config_files) $(BUGZILLA_CONFIG)
124
+ dpkg-buildpackage -rfakeroot -us -uc