]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/rpms/suse/bacula-aligned.spec.in
e6906a5e4614a6d0e18f1bf2ce9d85c331c96a04
[bacula/bacula] / bacula / platforms / rpms / suse / bacula-aligned.spec.in
1 # Bacula RPM spec file
2 #
3 # Copyright (C) 2013-2014 Bacula Systems SA
4
5 # Platform Build Configuration
6 # TODO: merge all plugins into one spec file
7
8 # basic defines for every build
9 %define _release           @RELEASE@
10 %define _version           @VERSION@
11 %define product            bacula
12 %define _lsm               @LSMDATE@
13 %define _packager Kern Sibbald <kern@baculasystems.com>
14 %define manpage_ext gz
15
16 # Don't strip binaries
17 %define __os_install_post %{nil}
18 %define __debug_install_post %{nil}
19 %define debug_package %{nil}
20
21 # Installation Directory locations
22 %define _prefix        /opt/bacula
23 %define _sbindir       /opt/bacula/bin
24 %define _bindir        /opt/bacula/bin
25 %define _subsysdir     /opt/bacula/working
26 %define sqlite_bindir  /opt/bacula/sqlite
27 %define _mandir        /usr/share/man
28 %define sysconf_dir    /opt/bacula/etc
29 %define scripts_dir    /opt/bacula/scripts
30 %define working_dir    /opt/bacula/working
31 %define pid_dir        /opt/bacula/working
32 %define plugin_dir     /opt/bacula/plugins
33 %define lib_dir        /opt/bacula/lib
34
35 # Daemon user:group Don't change them unless you know what you are doing
36 %define director_daemon_user    bacula
37 %define storage_daemon_user     bacula
38 %define file_daemon_user        root
39 %define daemon_group            bacula
40 # group that has write access to tape devices, usually disk on Linux
41 %define storage_daemon_group    disk
42
43 #--------------------------------------------------------------------------
44 # it should not be necessary to change anything below here for a release
45 # except for patch macros in the setup section
46 #--------------------------------------------------------------------------
47
48 %define base_package_name bacula
49
50 %{?contrib_packager:%define _packager %{contrib_packager}}
51
52 Summary: Bacula - The Network Backup Solution
53 Name: %{base_package_name}-aligned
54 Version: %{_version}
55 Release: %{_release}
56 Group: System Environment/Daemons
57 License: AGPLv3 
58 BuildRoot: %{_tmppath}/%{name}-root
59 URL: http://www.bacula.org/
60 Vendor: The Bacula Team
61 Packager: %{_packager}
62 Prefix: %{_prefix}
63 Distribution: Bacula Aligned Volumes
64
65 Source0: http://www.prdownloads.sourceforge.net/bacula/%{product}-%{version}.tar.gz
66
67 Requires: bacula-sd, %{base_package_name}-libs = %{_version}
68
69 # define the basic package description
70 %define blurb Bacula Aligned - The Network Backup Solution.
71 %define blurb2 Bacula Aligned plugin allows you to backup to a
72 %define blurb3 Volume with aligned blocks permitting easier deduplication.
73
74 Summary: Bacula Aligned Volume Storage - The Network Backup Solution
75 Group: System Environment/Daemons
76
77 %description
78 %{blurb}
79
80 %{blurb2}
81 %{blurb3}
82
83 This is Bacula Aligned Volumes Storage plugin.
84
85 %prep
86 %setup -T -D -n bacula-%{_version} -b 0
87
88 %build
89
90 cd ../bacula-%{_version}
91 ./configure \
92         --prefix=%{_prefix} \
93         --sbindir=%{_sbindir} \
94         --sysconfdir=%{sysconf_dir} \
95         --mandir=%{_mandir} \
96         --with-scriptdir=%{scripts_dir} \
97         --with-working-dir=%{working_dir} \
98         --with-plugindir=%{plugin_dir} \
99         --with-pid-dir=%{pid_dir} \
100         --with-subsys-dir=%{_subsysdir} \
101         --enable-smartalloc \
102         --disable-bat \
103         --enable-client-only \
104         --with-dir-user=%{director_daemon_user} \
105         --with-dir-group=%{daemon_group} \
106         --with-sd-user=%{storage_daemon_user} \
107         --with-sd-group=%{storage_daemon_group} \
108         --with-fd-user=%{file_daemon_user} \
109         --with-fd-group=%{daemon_group} \
110         --with-basename="XXX_HOSTNAME_XXX" \
111         --with-hostname="XXX_HOSTNAME_XXX" \
112         --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
113         --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
114         --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
115         --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
116         --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
117         --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX"
118
119 make
120
121 %install
122
123 mkdir -p $RPM_BUILD_ROOT%{_sbindir} 
124 mkdir -p $RPM_BUILD_ROOT%{plugin_dir}
125 mkdir -p $RPM_BUILD_ROOT%{scripts_dir}
126 mkdir -p $RPM_BUILD_ROOT%{lib_dir}
127
128 make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/stored install-aligned
129
130 # Remove unneeded file(s)
131 rm -f $RPM_BUILD_ROOT%{plugin_dir}/bacula-sd-aligned-driver.so
132
133 %files
134 %defattr(-,root,%{daemon_group})
135 %attr(-, root, %{daemon_group}) %{plugin_dir}/bacula-sd-aligned-driver-%{_version}.so
136
137 %clean
138 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
139
140 %changelog
141 * Mon Jul 3 2017 Davide Franco <davide.franco@baculasystems.com>
142 - First version