3 # Copyright (C) 2013-2014 Bacula Systems SA
5 # Platform Build Configuration
6 # TODO: merge all plugins into one spec file
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
16 # Don't strip binaries
17 %define __os_install_post %{nil}
18 %define __debug_install_post %{nil}
19 %define debug_package %{nil}
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
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
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 #--------------------------------------------------------------------------
48 %define base_package_name bacula
50 %{?contrib_packager:%define _packager %{contrib_packager}}
52 Summary: Bacula - The Network Backup Solution
53 Name: %{base_package_name}-aligned
56 Group: System Environment/Daemons
58 BuildRoot: %{_tmppath}/%{name}-root
59 URL: http://www.bacula.org/
60 Vendor: The Bacula Team
61 Packager: %{_packager}
63 Distribution: Bacula Aligned Volumes
65 Source0: http://www.prdownloads.sourceforge.net/bacula/%{product}-%{version}.tar.gz
67 Requires: bacula-sd, %{base_package_name}-libs = %{_version}
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.
74 Summary: Bacula Aligned Volume Storage - The Network Backup Solution
75 Group: System Environment/Daemons
83 This is Bacula Aligned Volumes Storage plugin.
86 %setup -T -D -n bacula-%{_version} -b 0
90 cd ../bacula-%{_version}
93 --sbindir=%{_sbindir} \
94 --sysconfdir=%{sysconf_dir} \
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 \
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"
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}
128 make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/stored install-aligned
130 # Remove unneeded file(s)
131 rm -f $RPM_BUILD_ROOT%{plugin_dir}/bacula-sd-aligned-driver.so
134 %defattr(-,root,%{daemon_group})
135 %attr(-, root, %{daemon_group}) %{plugin_dir}/bacula-sd-aligned-driver-%{_version}.so
138 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
141 * Mon Jul 3 2017 Davide Franco <davide.franco@baculasystems.com> - 7.4.7-1
142 - First version of Bacula aligned plugin rpm spec file