Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed May 28, 2014
2 parents a7dff6d + a00620e commit d48a09d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 42 deletions.
55 changes: 29 additions & 26 deletions platforms/packaging/bareos-RHEL_4.spec
Expand Up @@ -44,8 +44,6 @@ Vendor: The Bareos Team

%define _libversion 14.2.0

%define client_only 1

%define plugin_dir %_libdir/bareos/plugins
%define script_dir /usr/lib/bareos/scripts
%define working_dir /var/lib/bareos
Expand All @@ -65,6 +63,7 @@ Vendor: The Bareos Team
%define file_daemon_user root
%define storage_daemon_group %{daemon_group}

%define client_only 1
%define build_bat 0
%define build_qt_monitor 0
%define build_sqlite3 0
Expand Down Expand Up @@ -103,6 +102,7 @@ BuildRequires: systemd

Source0: %{name}_%{version}.tar.gz

BuildRequires: elfutils
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
Expand All @@ -122,16 +122,23 @@ BuildRequires: libfastlz-devel
%if 0%{?suse_version}
BuildRequires: sqlite3-devel
%else
#BuildRequires: sqlite-devel
BuildRequires: sqlite-devel
%endif
%endif
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
#BuildRequires: libqt4-devel
BuildRequires: openssl
BuildRequires: libcap-devel
BuildRequires: mtx

%if 0%{?build_bat} || 0%{?build_qt_monitor}
BuildRequires: libqt4-devel
%endif

%if 0%{?python_plugins}
BuildRequires: python-devel >= 2.6
%endif

%if 0%{?suse_version}

# link identical files
Expand All @@ -155,8 +162,11 @@ BuildRequires: tcp_wrappers
BuildRequires: redhat-lsb

# older versions require additional release packages
%if 0%{?rhel_version} >= 500 || 0%{?centos_version} >= 500
# Older RHEL (5)/ CentOS (5)
%if 0%{?rhel_version} && 0%{?rhel_version} <= 600
BuildRequires: redhat-release
%endif

%if 0%{?centos_version} && 0%{?centos_version} <= 600
BuildRequires: redhat-release
%endif

Expand All @@ -177,9 +187,6 @@ BuildRequires: lsb-release

%endif

%if 0%{?python_plugins}
BuildRequires: python-devel >= 2.6
%endif

Summary: Bareos All-In-One package (dir,sd,fd)
#BuildArch: noarch
Expand Down Expand Up @@ -460,9 +467,9 @@ This package contains bareos development files.
%setup

%build
#if #{undefined suse_version}
%if !0%{?suse_version}
export PATH=$PATH:/usr/lib64/qt4/bin:/usr/lib/qt4/bin
#endif
%endif
export MTX=/usr/sbin/mtx
# Notice keep the upstream order of ./configure --help
%configure \
Expand Down Expand Up @@ -498,14 +505,17 @@ export MTX=/usr/sbin/mtx
%if 0%{?build_bat}
--enable-bat \
%endif
%if 0%{?client_only}
--enable-client-only\
%endif
%if 0%{?build_qt_monitor}
--enable-traymonitor \
%endif
%if 0%{?client_only}
--enable-client-only \
%endif
--with-postgresql \
--with-mysql \
%if 0%{?build_sqlite3}
--with-sqlite3 \
%endif
--with-tcp-wrappers \
--with-dir-user=%{director_daemon_user} \
--with-dir-group=%{daemon_group} \
Expand All @@ -526,9 +536,6 @@ export MTX=/usr/sbin/mtx
--with-systemd \
%endif
--enable-includes
#if 0#{?build_sqlite3}
# --with-sqlite3 \
#endif

#Add flags
%__make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags};
Expand All @@ -545,10 +552,10 @@ export MTX=/usr/sbin/mtx
make DESTDIR=%{buildroot} install
%endif

install -d 755 %{buildroot}/usr/share/applications
install -d 755 %{buildroot}/usr/share/pixmaps
install -d -m 755 %{buildroot}/usr/share/applications
install -d -m 755 %{buildroot}/usr/share/pixmaps

install -d 755 %{buildroot}%{working_dir}
install -d -m 755 %{buildroot}%{working_dir}

#Cleaning
for F in \
Expand Down Expand Up @@ -1024,15 +1031,11 @@ if [ "$1" = 0 ]; then
fi

%postun director
#if [ "$1" -ge "1" ]; then
#restart_on_update bareos-dir
#fi
# to prevent aborting jobs, no restart on update
%insserv_cleanup

%postun storage
#if [ "$1" -ge "1" ]; then
#restart_on_update bareos-sd
#fi
# to prevent aborting jobs, no restart on update
%insserv_cleanup

%postun filedaemon
Expand Down
43 changes: 27 additions & 16 deletions platforms/packaging/bareos.spec
Expand Up @@ -63,6 +63,7 @@ Vendor: The Bareos Team
%define file_daemon_user root
%define storage_daemon_group %{daemon_group}

%define client_only 0
%define build_bat 1
%define build_qt_monitor 1
%define build_sqlite3 1
Expand Down Expand Up @@ -101,6 +102,7 @@ BuildRequires: systemd

Source0: %{name}_%{version}.tar.gz

BuildRequires: elfutils
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
Expand All @@ -125,11 +127,18 @@ BuildRequires: sqlite-devel
%endif
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: libqt4-devel
BuildRequires: openssl
BuildRequires: libcap-devel
BuildRequires: mtx

%if 0%{?build_bat} || 0%{?build_qt_monitor}
BuildRequires: libqt4-devel
%endif

%if 0%{?python_plugins}
BuildRequires: python-devel >= 2.6
%endif

%if 0%{?suse_version}

# link identical files
Expand All @@ -153,8 +162,11 @@ BuildRequires: tcp_wrappers
BuildRequires: redhat-lsb

# older versions require additional release packages
%if 0%{?rhel_version} >= 500 || 0%{?centos_version} >= 500
# Older RHEL (5)/ CentOS (5)
%if 0%{?rhel_version} && 0%{?rhel_version} <= 600
BuildRequires: redhat-release
%endif

%if 0%{?centos_version} && 0%{?centos_version} <= 600
BuildRequires: redhat-release
%endif

Expand All @@ -175,9 +187,6 @@ BuildRequires: lsb-release

%endif

%if 0%{?python_plugins}
BuildRequires: python-devel >= 2.6
%endif

Summary: Bareos All-In-One package (dir,sd,fd)
#BuildArch: noarch
Expand Down Expand Up @@ -465,7 +474,7 @@ This package contains bareos development files.
%setup

%build
%if %{undefined suse_version}
%if !0%{?suse_version}
export PATH=$PATH:/usr/lib64/qt4/bin:/usr/lib/qt4/bin
%endif
export MTX=/usr/sbin/mtx
Expand Down Expand Up @@ -505,6 +514,9 @@ export MTX=/usr/sbin/mtx
%endif
%if 0%{?build_qt_monitor}
--enable-traymonitor \
%endif
%if 0%{?client_only}
--enable-client-only \
%endif
--with-postgresql \
--with-mysql \
Expand Down Expand Up @@ -547,10 +559,10 @@ export MTX=/usr/sbin/mtx
make DESTDIR=%{buildroot} install
%endif

install -d 755 %{buildroot}/usr/share/applications
install -d 755 %{buildroot}/usr/share/pixmaps
install -d -m 755 %{buildroot}/usr/share/applications
install -d -m 755 %{buildroot}/usr/share/pixmaps

install -d 755 %{buildroot}%{working_dir}
install -d -m 755 %{buildroot}%{working_dir}

#Cleaning
for F in \
Expand Down Expand Up @@ -623,6 +635,7 @@ echo "This is a meta package to install a full bareos system" > %{buildroot}%{_d
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/README.bareos-client


%files bconsole
# console package
%defattr(-, root, root)
Expand Down Expand Up @@ -734,8 +747,10 @@ echo "This is a meta package to install a full bareos system" > %{buildroot}%{_d
%{_libdir}/libbareosfind.so
%{_libdir}/libbareoslmdb-%{_libversion}.so
%{_libdir}/libbareoslmdb.so
%if !0%{?client_only}
%{_libdir}/libbareosndmp-%{_libversion}.so
%{_libdir}/libbareosndmp.so
%endif
# generic stuff needed from multiple bareos packages
%dir /usr/lib/bareos/
%dir %{script_dir}
Expand Down Expand Up @@ -1028,15 +1043,11 @@ if [ "$1" = 0 ]; then
fi

%postun director
#if [ "$1" -ge "1" ]; then
#restart_on_update bareos-dir
#fi
# to prevent aborting jobs, no restart on update
%insserv_cleanup

%postun storage
#if [ "$1" -ge "1" ]; then
#restart_on_update bareos-sd
#fi
# to prevent aborting jobs, no restart on update
%insserv_cleanup

%postun filedaemon
Expand Down

0 comments on commit d48a09d

Please sign in to comment.