Lines 9-62
Link Here
|
9 |
LICENSE="GPL-2" |
9 |
LICENSE="GPL-2" |
10 |
SLOT="0" |
10 |
SLOT="0" |
11 |
KEYWORDS="hppa ppc sparc x86" |
11 |
KEYWORDS="hppa ppc sparc x86" |
12 |
IUSE="readline tcpd gnome mysql sqlite X static postgres wxwindows" |
12 |
IUSE="readline tcpd gnome mysql sqlite X static postgres wxwindows clientonly" |
13 |
|
13 |
|
14 |
#theres a local sqlite use flag. use it -OR- mysql, not both. |
14 |
#theres a local sqlite use flag. use it -OR- mysql, not both. |
15 |
#mysql is the reccomended choice ... |
15 |
#mysql is the reccomended choice ... |
16 |
DEPEND=">=sys-libs/zlib-1.1.4 |
16 |
DEPEND="${DEPEND} |
17 |
readline? ( >=sys-libs/readline-4.1 ) |
17 |
>=sys-libs/zlib-1.1.4 |
18 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
18 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
19 |
gnome? ( gnome-base/gnome-libs ) |
|
|
20 |
sqlite? ( =dev-db/sqlite-2* ) |
21 |
mysql? ( >=dev-db/mysql-3.23 ) |
22 |
postgres? ( >=dev-db/postgresql-7.4.0 ) |
23 |
X? ( virtual/x11 ) |
24 |
virtual/mta |
19 |
virtual/mta |
25 |
dev-libs/gmp" |
20 |
dev-libs/gmp |
26 |
RDEPEND="${DEPEND} |
21 |
!clientonly? ( |
27 |
sys-apps/mtx |
22 |
gnome? ( gnome-base/gnome-libs ) |
28 |
app-arch/mt-st" |
23 |
sqlite? ( =dev-db/sqlite-2* ) |
|
|
24 |
mysql? ( >=dev-db/mysql-3.23 ) |
25 |
postgres? ( >=dev-db/postgresql-7.4.0 ) |
26 |
X? ( virtual/x11 ) |
27 |
readline? ( >=sys-libs/readline-4.1 ) |
28 |
)" |
29 |
RDEPEND="${RDEPEND} |
30 |
${DEPEND} |
31 |
!clientonly? ( |
32 |
sys-apps/mtx |
33 |
app-arch/mt-st |
34 |
)" |
29 |
|
35 |
|
30 |
src_compile() { |
36 |
src_compile() { |
31 |
local myconf="" |
37 |
local myconf="" |
32 |
|
38 |
|
33 |
#define this to skip building the other daemons ... |
39 |
myconf="${myconf} |
34 |
[ -n "$BUILD_CLIENT_ONLY" ] \ |
|
|
35 |
&& myconf="${myconf} --enable-client-only" |
36 |
|
37 |
myconf=" |
38 |
`use_enable readline` |
39 |
`use_enable gnome` |
40 |
`use_enable tcpd tcp-wrappers` |
40 |
`use_enable tcpd tcp-wrappers` |
41 |
`use_enable X x` |
41 |
`use_enable clientonly client-only`" |
42 |
`use_enable wxwindows wx-console` |
42 |
|
43 |
" |
43 |
if ! ( use clientonly ); then |
44 |
#not ./configure'able |
44 |
myconf="${myconf} |
45 |
#`use_enable ssl` |
45 |
`use_enable X x` |
|
|
46 |
`use_enable wxwindows wx-console` |
47 |
`use_enable readline` |
48 |
`use_enable gnome`" |
49 |
#not ./configure'able |
50 |
#`use_enable ssl` |
46 |
|
51 |
|
47 |
# mysql is the reccomended choice ... |
52 |
# mysql is the reccomended choice ... |
48 |
if use mysql |
53 |
if use mysql |
49 |
then |
54 |
then |
50 |
myconf="${myconf} --with-mysql=/usr" |
55 |
myconf="${myconf} --with-mysql" |
51 |
elif use postgres |
56 |
elif use postgres |
52 |
then |
57 |
then |
53 |
myconf="${myconf} --with-postgresql=/usr" |
58 |
myconf="${myconf} --with-postgresql" |
54 |
elif use sqlite |
59 |
elif use sqlite |
55 |
then |
60 |
then |
56 |
myconf="${myconf} --with-sqlite=/usr" |
61 |
myconf="${myconf} --with-sqlite" |
57 |
elif use sqlite && use mysql |
62 |
elif use sqlite && use mysql |
58 |
then |
63 |
then |
59 |
myconf="${myconf/--with-sqlite/}" |
64 |
myconf="${myconf/--with-sqlite/}" |
|
|
65 |
fi; |
60 |
fi |
66 |
fi |
61 |
|
67 |
|
62 |
./configure \ |
68 |
./configure \ |
Lines 76-97
Link Here
|
76 |
then |
82 |
then |
77 |
cd ${S}/src/filed |
83 |
cd ${S}/src/filed |
78 |
make static-baula-fd |
84 |
make static-baula-fd |
79 |
cd ${S}/src/console |
85 |
if ! ( use clientonly ); then |
80 |
make static-console |
86 |
cd ${S}/src/console |
81 |
cd ${S}/src/dird |
87 |
make static-console |
82 |
make static-bacula-dir |
88 |
cd ${S}/src/dird |
83 |
if use gnome |
89 |
make static-bacula-dir |
84 |
then |
90 |
if use gnome |
85 |
cd ${S}/src/gnome-console |
91 |
then |
86 |
make static-gnome-console |
92 |
cd ${S}/src/gnome-console |
87 |
fi |
93 |
make static-gnome-console |
88 |
if use wxwindows |
94 |
fi |
89 |
then |
95 |
if use wxwindows |
90 |
cd ${S}/src/wx-console |
96 |
then |
91 |
make static-wx-console |
97 |
cd ${S}/src/wx-console |
92 |
fi |
98 |
make static-wx-console |
93 |
cd ${S}/src/stored |
99 |
fi |
94 |
make static-bacula-sd |
100 |
cd ${S}/src/stored |
|
|
101 |
make static-bacula-sd; |
102 |
fi; |
95 |
fi |
103 |
fi |
96 |
} |
104 |
} |
97 |
|
105 |
|
Lines 102-123
Link Here
|
102 |
then |
110 |
then |
103 |
cd ${S}/src/filed |
111 |
cd ${S}/src/filed |
104 |
cp static-bacula-fd ${D}/usr/sbin/bacula-fd |
112 |
cp static-bacula-fd ${D}/usr/sbin/bacula-fd |
105 |
cd ${S}/src/console |
113 |
if ! ( use clientonly ); then |
106 |
cp static-console ${D}/usr/sbin/console |
114 |
cd ${S}/src/console |
107 |
cd ${S}/src/dird |
115 |
cp static-console ${D}/usr/sbin/console |
108 |
cp static-bacula-dir ${D}/usr/sbin/bacula-dir |
116 |
cd ${S}/src/dird |
109 |
if use gnome |
117 |
cp static-bacula-dir ${D}/usr/sbin/bacula-dir |
110 |
then |
118 |
if use gnome |
111 |
cd ${S}/src/gnome-console |
119 |
then |
112 |
cp static-gnome-console ${D}/usr/sbin/gnome-console |
120 |
cd ${S}/src/gnome-console |
113 |
fi |
121 |
cp static-gnome-console ${D}/usr/sbin/gnome-console |
114 |
if use wxwindows |
122 |
fi |
115 |
then |
123 |
if use wxwindows |
116 |
cd ${S}/src/wx-console |
124 |
then |
117 |
cp static-wx-console ${D}/usr/sbin/wx-console |
125 |
cd ${S}/src/wx-console |
118 |
fi |
126 |
cp static-wx-console ${D}/usr/sbin/wx-console |
119 |
cd ${S}/src/storge |
127 |
fi |
120 |
cp static-bacula-sd ${D}/usr/sbin/bacula-sd |
128 |
cd ${S}/src/storge |
|
|
129 |
cp static-bacula-sd ${D}/usr/sbin/bacula-sd; |
130 |
fi; |
121 |
fi |
131 |
fi |
122 |
|
132 |
|
123 |
rm -rf ${D}/var #empty dir |
133 |
rm -rf ${D}/var #empty dir |
Lines 139-164
Link Here
|
139 |
pkg_postinst() { |
149 |
pkg_postinst() { |
140 |
# empty dir ... |
150 |
# empty dir ... |
141 |
install -m0755 -o root -g root -d ${ROOT}/var/lib/bacula |
151 |
install -m0755 -o root -g root -d ${ROOT}/var/lib/bacula |
142 |
einfo |
152 |
if ! ( use clientonly ); then |
143 |
einfo "Please note either/or nature of database USE flags for" |
153 |
einfo |
144 |
einfo "Bacula. If mysql is set, it will be used, else postgresql" |
154 |
einfo "Please note either/or nature of database USE flags for" |
145 |
einfo "else finally SQLite. If you wish to have multiple DBs on" |
155 |
einfo "Bacula. If mysql is set, it will be used, else postgresql" |
146 |
einfo "one system, you may wish to unset auxillary DBs for this" |
156 |
einfo "else finally SQLite. If you wish to have multiple DBs on" |
147 |
einfo "build." |
157 |
einfo "one system, you may wish to unset auxillary DBs for this" |
148 |
einfo |
158 |
einfo "build." |
149 |
einfo "If this is a new install and you plan to use mysql for your" |
159 |
einfo |
150 |
einfo "catalog database, then you should now create it by doing" |
160 |
einfo "If this is a new install and you plan to use mysql for your" |
151 |
einfo "these commands:" |
161 |
einfo "catalog database, then you should now create it by doing" |
152 |
einfo " sh /etc/bacula/grant_mysql_privileges" |
162 |
einfo "these commands:" |
153 |
einfo " sh /etc/bacula/create_mysql_database" |
163 |
einfo " sh /etc/bacula/grant_mysql_privileges" |
154 |
einfo " sh /etc/bacula/make_mysql_tables" |
164 |
einfo " sh /etc/bacula/create_mysql_database" |
155 |
einfo |
165 |
einfo " sh /etc/bacula/make_mysql_tables" |
156 |
einfo "Then setup your configuration files in /etc/bacula and" |
166 |
einfo |
157 |
einfo "start the daemons:" |
167 |
einfo "Then setup your configuration files in /etc/bacula and" |
158 |
einfo " /etc/init.d/bacula start" |
168 |
einfo "start the daemons:" |
159 |
einfo |
169 |
einfo " /etc/init.d/bacula start" |
160 |
einfo "If upgrading from version 1.30 or below, please note that" |
170 |
einfo |
161 |
einfo "the database format has changed. Please read the" |
171 |
einfo "If upgrading from version 1.30 or below, please note that" |
162 |
einfo "release notes for how to upgrade your database!!!" |
172 |
einfo "the database format has changed. Please read the" |
163 |
einfo |
173 |
einfo "release notes for how to upgrade your database!!!" |
|
|
174 |
einfo; |
175 |
fi |
164 |
} |
176 |
} |