~ubuntu-branches/debian/sid/bugzilla/sid

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu_05_makefile_install.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2008-06-27 22:34:34 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080627223434-0ib57vstn43bb4a3
Tags: 3.0.4.1-1
* Update of French, Russian and German translations. (closes: #488251)
* Added Bulgarian and Belarusian translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
# ubuntu_05_makefile_install.dpatch
3
 
#   by Jonathan Patrick Davies <jpds@ubuntu.com>
4
 
#
5
 
# DP: Provide a nice way of install necessary files for bugzilla.
6
 
 
7
 
@DPATCH@
8
 
--- ./Makefile  2008-04-22 19:49:52.000000000 +0200
9
 
+++ ./Makefile  2008-05-30 21:04:15.000000000 +0200
10
 
@@ -0,0 +1,114 @@
11
 
+# Makefile written for the Debian package of bugzilla.
12
 
+# Modified by Jonathan Patrick Davies <jpds@ubuntu.com>
13
 
+
14
 
+# Based on the Remi Perrot's one, done for 
15
 
+# the 2.18 release.
16
 
+
17
 
+# Destination paths
18
 
+# For a better maintenance, we'll create by hand each
19
 
+# bugzilla's sub directories.
20
 
+DESTDIR                = 
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
29
 
+
30
 
+# Source paths
31
 
+cgi_files      = *.cgi
32
 
+lib_files      = *.pm 
33
 
+pl_files       = runtests.pl 
34
 
+lib_perlscripts        = checksetup.pl collectstats.pl email_in.pl importxml.pl testserver.pl whineatnews.pl whine.pl
35
 
+lib_dir                = Bugzilla
36
 
+static_files   = *.dtd *.js *.txt 
37
 
+config_files   = debian/default-files/localconfig debian/default-files/index.html 
38
 
+
39
 
+install: install_static_dirs install_static_files install_lib_files \
40
 
+        install_cgi install_config install_template install_contrib
41
 
+
42
 
+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
56
 
+       
57
 
+install_static_dirs:
58
 
+       @for this_dir in $(shell find skins -type d) ; do \
59
 
+               install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
60
 
+       done
61
 
+       @for this_dir in $(shell find js -type d) ; do \
62
 
+               install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
63
 
+       done
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 ;\
68
 
+       done
69
 
+       @for this_dir in $(shell find skins -type d) ; do \
70
 
+               install -d -m 0755 -o root -g root $(BUGZILLA_WWW)/$$this_dir ;\
71
 
+       done
72
 
+
73
 
+install_template:
74
 
+       @for this_dir in $(shell find template -type d) ; do \
75
 
+               install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)/$$this_dir ;\
76
 
+       done
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` ;\
79
 
+       done
80
 
+
81
 
+
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` ;\
87
 
+       done
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` ;\
91
 
+       done
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` ;\
96
 
+       done
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` ;\
99
 
+       done
100
 
+               
101
 
+install_lib_files:
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 ;\
109
 
+       done
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` ;\
112
 
+       done
113
 
+       install -d -m 0755 -o root -g root $(BUGZILLA_DATADIR)
114
 
+       
115
 
+install_cgi:
116
 
+       install -d -m 0755 -o root -g root $(BUGZILLA_CGIDIR)
117
 
+       install -m 0755 -o root -g root $(cgi_files) $(BUGZILLA_CGIDIR)
118
 
+
119
 
+install_config:
120
 
+       install -d -m 0755 -o root -g root $(BUGZILLA_CONFIG)
121
 
+       install -m 0644 -o root -g root $(config_files) $(BUGZILLA_CONFIG)
122
 
+       
123
 
+deb:
124
 
+       dpkg-buildpackage -rfakeroot -us -uc