1 |
jonen |
1.1 |
<h3>build bacula debian binary package</h3> |
2 |
|
|
<hr/> |
3 |
|
|
|
4 |
|
|
Description: |
5 |
|
|
short notes about how to compile bacula sources (in this case with MySQL database support), |
6 |
|
|
and package the binaries as debian packages. |
7 |
|
|
|
8 |
|
|
|
9 |
|
|
#==== create temp dirs ======== |
10 |
|
|
mkdir -p bacula/build |
11 |
|
|
mkdir -p bacula/debian |
12 |
|
|
|
13 |
|
|
#======= prepare install dir ============= |
14 |
|
|
cd bacula/debian |
15 |
|
|
mkdir -p /usr/local/bacula/ |
16 |
|
|
|
17 |
|
|
#======= build and install bacula ============ |
18 |
|
|
cd bacula/build ...and download source file here (bacula, depkgs, depkgs1) |
19 |
|
|
|
20 |
|
|
untar all |
21 |
|
|
|
22 |
|
|
be sure |
23 |
|
|
libmysqlclient10-dev |
24 |
|
|
and |
25 |
|
|
libreadline4-dev is installed ! |
26 |
|
|
|
27 |
|
|
# make mtx (we don't need SQLite, we have MySQL...i hope..) |
28 |
|
|
cd depkgs |
29 |
|
|
make mtx |
30 |
|
|
|
31 |
|
|
# make helper apps |
32 |
|
|
cd ../depkgs1 |
33 |
|
|
make |
34 |
|
|
|
35 |
jonen |
1.4 |
cd ../bacula-1.29 |
36 |
jonen |
1.1 |
|
37 |
|
|
# configure bacula |
38 |
|
|
./configure \ |
39 |
|
|
--prefix=/usr/local/bacula \ |
40 |
|
|
--enable-static-tools \ |
41 |
|
|
--enable-static-fd \ |
42 |
|
|
--enable-static-sd \ |
43 |
|
|
--enable-static-dir \ |
44 |
|
|
--enable-static-cons \ |
45 |
|
|
--with-mysql \ |
46 |
|
|
--enable-gnome \ |
47 |
|
|
--with-readline |
48 |
|
|
|
49 |
|
|
# make and install bacula to prefixed dir |
50 |
|
|
make |
51 |
|
|
make install DESTDIR=/dir/to/install/bacula/debian ( e.g /tmp/bacula/debian ) |
52 |
|
|
|
53 |
|
|
#========== make final modifications and copy docs into package tree ======== |
54 |
|
|
# |
55 |
|
|
# create control file |
56 |
|
|
cd debian/DEBIAN |
57 |
|
|
nano control |
58 |
|
|
example: |
59 |
|
|
========== snip ======== |
60 |
|
|
Package: bacula |
61 |
jonen |
1.3 |
Version: 1.29-1 |
62 |
jonen |
1.1 |
Section: net |
63 |
|
|
Priority: optional |
64 |
|
|
Architecture: all |
65 |
jonen |
1.5 |
Depends: libmysqlclient10 (>= 3.23.49-8), libstdc++5 (>= 3.2.1-0pre3), |
66 |
|
|
gcc-3.2-base (>= 3.2.1-0pre3), libgcc1 (>= 3.2.1-0pre3) |
67 |
jonen |
1.1 |
Maintainer: Sebastian Utz <seut@netfrag.org> |
68 |
|
|
Description: Bacula - The Network Backup Solution |
69 |
|
|
Bacula is a set of computer programs that permit you (or the system administrator) to |
70 |
|
|
manage backup, recovery, and verification of computer data across a network of |
71 |
|
|
computers of different kinds. In technical terms, it is a network client/server based |
72 |
|
|
backup program. Bacula is relatively easy to use and efficient, while offering many |
73 |
|
|
advanced storage management features that make it easy to find and recover lost or |
74 |
|
|
damaged files. Bacula source code has been released under the GPL version 2 license. |
75 |
|
|
|
76 |
|
|
This version is compiled with MySQL support. |
77 |
|
|
========== end snip ======== |
78 |
|
|
|
79 |
|
|
|
80 |
|
|
# install doc to package tree |
81 |
|
|
cd ../usr/ |
82 |
|
|
mkdir -p share/doc/bacula |
83 |
|
|
cp all docu stuf at source to this dir |
84 |
|
|
cp bacula-source/COPYRIGHT to share/doc/bacula/copyright |
85 |
|
|
|
86 |
|
|
# create changelog files |
87 |
|
|
cd share/doc/bacula/ |
88 |
|
|
nano changelog |
89 |
|
|
example: |
90 |
|
|
========== snip ======== |
91 |
jonen |
1.2 |
bacula (1.29-1) |
92 |
jonen |
1.1 |
|
93 |
|
|
* create bacula debian package |
94 |
|
|
|
95 |
|
|
-- Sebastian Utz <seut@netfrag.org> 2003-03-12 04:45:55 +0100 |
96 |
|
|
========== end snip ======== |
97 |
|
|
|
98 |
|
|
nano changelog.DEBIAN |
99 |
|
|
example: |
100 |
|
|
========== snip ======== |
101 |
|
|
bacula Debian maintainer and upstream author are identical. |
102 |
|
|
Therefore see also normal changelog file for Debian changes. |
103 |
|
|
========== end snip ======== |
104 |
|
|
|
105 |
|
|
gzip --best changelog |
106 |
|
|
gzip --best changelog.DEBIAN |
107 |
|
|
|
108 |
|
|
|
109 |
|
|
# maybe modify some start-up scripts under ../usr/local/bacula/etc/ |
110 |
|
|
# e.g create a start-up script for each daemon |
111 |
|
|
cd ../usr/local/bacula/etc/ |
112 |
|
|
cp bacula bacula-all |
113 |
|
|
cp bacula bacula-dir |
114 |
|
|
nano bacula bacula-dir (to remove starting of the other daemons) |
115 |
|
|
# ...same to the other daemons( fd and sd) |
116 |
|
|
|
117 |
|
|
# maybe modify 'console' start-up script |
118 |
|
|
example: |
119 |
|
|
========== snip ======== |
120 |
|
|
#!/bin/sh |
121 |
|
|
CONSOLE=/usr/local/bacula/sbin/console |
122 |
|
|
DEFAULT_CONF=/usr/local/bacula/etc/console.conf |
123 |
|
|
if [ $# = 1 ] ; then |
124 |
|
|
echo "doing console $1" |
125 |
|
|
$CONSOLE -c $1 |
126 |
|
|
else |
127 |
|
|
$CONSOLE -c $DEFAULT_CONF |
128 |
|
|
fi |
129 |
|
|
========== end snip ======== |
130 |
|
|
|
131 |
|
|
# maybe create sym-links under /usr/local/sbin/ to console apps |
132 |
|
|
cd ../usr/local/sbin/ |
133 |
|
|
ln -s ../bacula/etc/console bacula-console |
134 |
|
|
ln -s ../bacula/etc/console-gnome bacula-console-gnome |
135 |
|
|
|
136 |
|
|
|
137 |
|
|
# ============== create debian package ============= |
138 |
|
|
# |
139 |
|
|
cd bacula/ (where debian/DEBIAN etc. is under the tree) |
140 |
|
|
dpkg-deb --build debian |
141 |
jonen |
1.4 |
mv debian.deb bacula_1.29-1.deb |
142 |
jonen |
1.1 |
|
143 |
|
|
|
144 |
|
|
<hr/> |
145 |
jonen |
1.6 |
$Id: build_bacula_deb.twingle,v 1.5 2003/03/13 22:18:12 jonen Exp $ |