and security2.fdb to /var/lib/firebird/) + triggerpostun
- updated TODO, rel. 2
Changed files:
Firebird.spec -> 1.64
# - check if it's fixed now (RISC_ALIGNMENT is defined)
# - create classic server/super server subpackages and drop bcond
# (see firebird2 on debian how to do it)
# - check if it's fixed now (RISC_ALIGNMENT is defined)
# - create classic server/super server subpackages and drop bcond
# (see firebird2 on debian how to do it)
#
# Conditional build:
%bcond_with ss # Super Server (standalone daemon instead of inetd service)
#
# Conditional build:
%bcond_with ss # Super Server (standalone daemon instead of inetd service)
Name: Firebird
# FirebirdCS/FirebirdSS (Classic Server/Super Server)?
Version: 2.1.1.17910
Name: Firebird
# FirebirdCS/FirebirdSS (Classic Server/Super Server)?
Version: 2.1.1.17910
License: Interbase Public License 1.0, Initial Developer's Public License 1.0
Group: Applications/Databases
Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2
License: Interbase Public License 1.0, Initial Developer's Public License 1.0
Group: Applications/Databases
Source0: http://dl.sourceforge.net/firebird/Firebird-%{version}-0.tar.bz2
Patch1: %{name}-editline.patch
Patch2: %{name}-va.patch
Patch3: %{name}-morearchs.patch
Patch1: %{name}-editline.patch
Patch2: %{name}-va.patch
Patch3: %{name}-morearchs.patch
+Patch4: %{name}-FHS.patch
URL: http://www.firebirdsql.org/
BuildRequires: autoconf >= 2.56
BuildRequires: automake
URL: http://www.firebirdsql.org/
BuildRequires: autoconf >= 2.56
BuildRequires: automake
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# force rebuild
rm -f src/dsql/parse.cpp
# force rebuild
rm -f src/dsql/parse.cpp
%configure \
--with-editline \
%configure \
--with-editline \
+ --with-gnu-ld \
+ --with-gpre-pascal \
--with-system-editline \
--with-system-icu \
--with-system-editline \
--with-system-icu \
%{?with_ss:--enable-superserver} \
--prefix=%{ibdir} \
%{?debug:--enable-debug}
%{?with_ss:--enable-superserver} \
--prefix=%{ibdir} \
%{?debug:--enable-debug}
%{__make} -C src -f ../gen/Makefile.install buildImageDir
%{__make} -C src -f ../gen/Makefile.install buildImageDir
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig/rc-inetd}
+install -d $RPM_BUILD_ROOT/etc/{firebird,rc.d/init.d,sysconfig/rc-inetd}
install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
install -d $RPM_BUILD_ROOT{%{ibdir},%{_libdir},%{_includedir}} \
+install -d $RPM_BUILD_ROOT/var/{log,lib/firebird} \
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
install gen/firebird/lib/libfb*.a $RPM_BUILD_ROOT%{_libdir}
install gen/firebird/lib/libfbembed.so* $RPM_BUILD_ROOT%{_libdir}
-cd gen/buildroot/%{ibdir}
+touch $RPM_BUILD_ROOT/var/log/firebird.log
-cp -af UDF bin help intl aliases.conf firebird.conf firebird.msg security2.fdb \
- $RPM_BUILD_ROOT%{ibdir}
+cd gen/buildroot/%{ibdir}
+install security2.fdb $RPM_BUILD_ROOT/var/lib/firebird
+install *.conf $RPM_BUILD_ROOT%{_sysconfdir}/firebird
install include/* $RPM_BUILD_ROOT%{_includedir}
install include/* $RPM_BUILD_ROOT%{_includedir}
+cp -af UDF bin help intl firebird.msg $RPM_BUILD_ROOT%{ibdir}
cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
cp -df lib/* $RPM_BUILD_ROOT%{_libdir}
cp -rf examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
+%triggerpostun -- %{name} < 2.1.1.17910-2
+if [ -f %{ibdir}/aliases.conf.rpmsave ]; then
+ mv -f %{ibdir}/aliases.conf.rpmsave %{_sysconfdir}/firebird/aliases.conf
+fi
+if [ -f %{ibdir}/firebird.conf.rpmsave ]; then
+ mv -f %{ibdir}/firebird.conf.rpmsave %{_sysconfdir}/firebird/firebird.conf
+fi
+if [ -f %{ibdir}/security2.fdb.rpmsave ]; then
+ mv -f %{ibdir}/security2.fdb.rpmsave /var/lib/firebird/security2.fdb
+fi
+
%files
%defattr(644,root,root,755)
%doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
%files
%defattr(644,root,root,755)
%doc doc/{license,sql.extensions,Firebird_conf.txt,README.user*,WhatsNew,fb2-todo.txt}
+%dir %{_sysconfdir}/firebird
+%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/firebird/*.conf
%attr(755,root,root) %{_libdir}/libib_util.so
%attr(755,root,root) %{_libdir}/libib_util.so
-%dir %attr(770,root,firebird) %{ibdir}
%attr(755,root,root) %{ibdir}/UDF
%attr(755,root,root) %{ibdir}/bin
%{ibdir}/help
%attr(755,root,root) %{ibdir}/UDF
%attr(755,root,root) %{ibdir}/bin
%{ibdir}/help
# should it be moved to /etc and marked as config?
%{ibdir}/intl/fbintl.conf
%{ibdir}/firebird.msg
# should it be moved to /etc and marked as config?
%{ibdir}/intl/fbintl.conf
%{ibdir}/firebird.msg
-# following files should be in /var (*.fdb) and /etc (*.conf)?
-%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/security2.fdb
-%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/aliases.conf
-%attr(640,root,firebird) %config(noreplace) %verify(not md5 mtime size) %{ibdir}/firebird.conf
+%dir %attr(770,root,firebird) /var/lib/firebird
+%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/lib/firebird/security2.fdb
+%attr(660,root,firebird) %config(noreplace) %verify(not md5 mtime size) /var/log/firebird.log
+
%if %{with ss}
%attr(754,root,root) /etc/rc.d/init.d/firebird
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird
%if %{with ss}
%attr(754,root,root) /etc/rc.d/init.d/firebird
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/firebird