firebird/firebird.spec

295 lines
9.9 KiB
RPMSpec

%define groupid 65055
%define userid 65055
%define pkg_name %{name}-%{version}-0
%define major %(echo %version | cut -d. -f 1-3)
%define major_ %(echo %version | cut -d. -f 1-3 | tr . _)
%define majver %(echo %version | cut -d. -f 1-2)
Name: firebird
Version: 4.0.0.2496
Release: 1mamba
Summary: SQL Relational Database
Group: Applications/Databases
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.firebirdsql.org/
Source0: https://github.com/FirebirdSQL/firebird/releases/download/v%{major}/Firebird-%{version}-0.tar.xz
Source1: Firebird-2.1.2.18118.0-profile.sh
Source2: Firebird-2.1.2.18118.0-profile.csh
Source3: Firebird-2.1.2.18118.0-logrotate
Source4: firebird.service
Source5: firebird-tmpfiles.conf
Source6: firebird-sysusers.conf
Source7: firebird-default.password
License: MPL 1.1
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libatomic-devel
BuildRequires: libedit-devel
BuildRequires: libgcc
BuildRequires: libncurses-devel
BuildRequires: libtomcrypt-devel
BuildRequires: libtommath-devel
## AUTOBUILDREQ-END
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: libtool
BuildRequires: libtomcrypt-devel
BuildConflicts: libfbclient < %{majver}
Requires: libfbclient = %{?epoch:%epoch:}%{version}-%{release}
Provides: Firebird
Obsoletes: Firebird < 4.0.0
%systemd_requires
Provides: firebird-classic
Obsoletes: firebird-classic < 3.0.7.33374
Provides: firebird-superserver
Obsoletes: firebird-superserver < 4.0
Provides: Firebird-superserver
Obsoletes: Firebird-superserver < 3.0.7.33374
%description
%{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. %{name} offers excellent concurrency, high performance,and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981.
The %{name} Project is a commercially independent project of C and C++ programmers, technical advisors and supporters developing and enhancing a multi-platform relational database management system based on the source code released by Inprise Corp (now known as Borland Software Corp) on 25 July, 2000.
%package devel
Group: Applications/Databases
Summary: Development Libraries for %{name} SQL RDBMS
Requires: libfbclient = %{?epoch:%epoch:}%{version}-%{release}
Provides: Firebird-devel
Obsoletes: Firebird-devel < 3.0.7.33374
%description devel
%{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms.
This package contains development libraries for %{name}.
%package doc
Group: Documentation
Summary: Documentation for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: Firebird-doc
Obsoletes: Firebird-doc < 3.0.7.33374
%description doc
%{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms.
This package contains documentation for %{name}.
%package -n libfbclient
Group: System/Libraries
Summary: Multi-threaded, non-local client libraries for Firebird SQL RDBMS
Provides: libfbclient-Firebird
Obsoletes: libfbclient-Firebird < 3.0.7.33374
Provides: libfbclient-firebird
Obsoletes: libfbclient-firebird < 3.0.7.33374
%description -n libfbclient
%{name} is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms.
This package contains multi-threaded, non-local client libraries for Firebird SQL Database
%debug_package
%prep
%setup -q -n Firebird-%{version}-0
#-D -T
#:<< __EOF
NOCONFIGURE=1 ./autogen.sh
%build
#:<< __EOF
%configure \
--disable-rpath \
--with-fbconf=%{_sysconfdir}/firebird \
--with-fbinclude=%{_includedir}/firebird \
--with-fbbin=%{_bindir} \
--with-fbdoc=%{_docdir}/firebird \
--with-fbhelp=%{_docdir}/firebird/help \
--with-fbintl=%{_libdir}/firebird/intl \
--with-fbsbin=%{_libdir}/firebird/bin \
--with-fblib=%{_libdir} \
--with-fbsecure-db=/var/lib/firebird/system \
--with-fbmsg=%{_libdir}/firebird/msg \
--with-fblog=/var/log/firebird \
--with-fbglock=/run/firebird \
--with-fbplugins=%{_libdir}/firebird/plugins \
--with-fbtzdata=%{_localstatedir}/lib/%{name}/tzdata \
--with-system-editline \
--without-fbmisc \
--without-fbsample \
--without-fbsample-db
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
sed -i "s|whoami|echo root|;s|chown|#chown|;" gen/install/makeInstallImage.sh
cd gen
./install/makeInstallImage.sh
cd ..
install -d -m0755 %{buildroot}
cp -av gen/buildroot/* %{buildroot}/
install -Dm644 %{SOURCE4} %{buildroot}%{_unitdir}/firebird.service
install -Dm644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/firebird.conf
install -Dm644 %{SOURCE6} %{buildroot}%{_sysusersdir}/firebird.conf
install -Dm440 %{SOURCE7} %{builrooot}/var/lib/firebird/system/SYSDBA.password
install -Dm644 %{buildroot}%{_sysconfdir}/firebird/I{,D}PLicense.txt -t %{buildroot}%{_datadir}/licenses/%{name}
# Remove unused files and dirs
rm %{buildroot}%{_sysconfdir}/firebird/I{,D}PLicense.txt
rm %{buildroot}%{_sysconfdir}/firebird/README.md
rm %{buildroot}%{_sysconfdir}/firebird/CHANGELOG.md
rm -rf %{buildroot}/var/log
rm -rf %{buildroot}/run
mv %{buildroot}%{_bindir}/isql{,-fb}
chmod -R ugo-w %{buildroot}%{_docdir}/firebird
chmod -R o= %{buildroot}/var/lib/firebird
chmod u+w -R %{buildroot}%{_docdir}/firebird
#chown -R 184:184 $pkgdir/var/lib/firebird
ln -s %{_libdir}/firebird/bin/fb_config %{buildroot}%{_bindir}/fb_config
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -rf gen
%pre
if [ $1 -ge 1 ]; then
/usr/sbin/groupadd firebird -g %{groupid} 2>/dev/null
/usr/sbin/useradd -u %{userid} -c 'Firebird user' -d /dev/null -g firebird \
-s /bin/false firebird 2>/dev/null
fi
:
%post
%systemd_post firebird.service
:
%postun
%systemd_postun_with_restart firebird.service
:
%preun
%systemd_preun firebird.service
if [ $1 -eq 0 ]; then
/usr/sbin/userdel firebird 2>/dev/null
/usr/sbin/groupdel firebird 2>/dev/null
fi
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/firebird
%config(noreplace) %{_sysconfdir}/firebird/databases.conf
%config(noreplace) %{_sysconfdir}/firebird/plugins.conf
%config(noreplace) %{_sysconfdir}/firebird/fbtrace.conf
%config(noreplace) %{_sysconfdir}/firebird/replication.conf
%config(noreplace) %attr(664,firebird,firebird) %{_sysconfdir}/firebird/firebird.conf
%{_bindir}/fbsvcmgr
%{_bindir}/fbtracemgr
%{_bindir}/gpre
%{_bindir}/gsplit
%{_bindir}/isql-fb
%{_bindir}/qli
%{_bindir}/gbak
%{_bindir}/gfix
%{_bindir}/gsec
%{_bindir}/gstat
%{_bindir}/nbackup
%{_unitdir}/firebird.service
%{_sysusersdir}/firebird.conf
%{_tmpfilesdir}/firebird.conf
%dir %{_libdir}/firebird
%dir %{_libdir}/firebird/plugins
%{_libdir}/firebird/plugins/*.so
%{_libdir}/firebird/plugins/udr_engine.conf
%dir %{_libdir}/firebird/plugins/udr
%{_libdir}/firebird/plugins/udr/*
#%dir %{_libdir}/firebird/UDF
#%{_libdir}/firebird/UDF/*.so
#%{_libdir}/firebird/UDF/*.sql
%{_libdir}/firebird/intl/fbintl*
%{_libdir}/firebird/msg/firebird.msg
%{_localstatedir}/lib/firebird/system/security4.fdb
%{_localstatedir}/lib/firebird/tzdata/metaZones.res
%{_localstatedir}/lib/firebird/tzdata/timezoneTypes.res
%{_localstatedir}/lib/firebird/tzdata/windowsZones.res
%{_localstatedir}/lib/firebird/tzdata/zoneinfo64.res
%dir %{_libdir}/firebird/bin
%{_libdir}/firebird/bin/*
%dir %{_localstatedir}/lib/firebird
%dir %{_localstatedir}/lib/firebird/tzdata
%{_localstatedir}/lib/firebird/tzdata/*
%doc doc/license/IDPL.txt
%doc doc/license/README.license.usage.txt
%files devel
%defattr(-,root,root)
%{_bindir}/fb_config
%{_includedir}/*.h
%dir %{_includedir}/firebird
%{_includedir}/firebird/*
%{_libdir}/libfbclient.so
%{_libdir}/libib_util.so
%files -n libfbclient
%defattr(-,root,root)
%attr(755,root,root) %{_libdir}/libfbclient.so.*
##%doc doc/license/IDPL.txt
##%doc doc/license/README.license.usage.txt
%files doc
%defattr(-,root,root)
%dir %{_datadir}/licenses/firebird
%{_datadir}/licenses/firebird/*
%dir %{_datadir}/doc/firebird
%{_datadir}/doc/firebird/*
%changelog
* Thu Jun 17 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.0.2496-1mamba
- update to 4.0.0.2496
* Tue Jun 15 2021 Silvan Calarco <silvan.calarco@m+ambasoft.it> 3.0.7.33374-1mamba
- update to 3.0.7.33374
* Fri May 04 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.3.32900-1mamba
- update to 3.0.3.32900
* Fri May 04 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.2.32703-1mamba
- update to 3.0.2.32703
* Wed May 02 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.7.27050-2mamba
- move %{_libdir}/firebird/bin/* from -superserver to libfbclient
* Sat Jan 06 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.7.27050-1mamba
- update to 2.5.7.27050
* Tue Jun 04 2013 Automatic Build System <autodist@mambasoft.it> 2.5.2.26540-1mamba
- update to 2.5.2.26540
* Fri Sep 21 2012 Automatic Build System <autodist@mambasoft.it> 2.1.5.18496-1mamba
- update to 2.1.5.18496
* Fri Apr 08 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.4.18393-1mamba
- update to 2.1.4.18393
- removed duplicated csh profile.d script
- renamed from Firebird to firebird
- create firebird user and group as required
* Wed Jun 30 2010 Automatic Build System <autodist@mambasoft.it> 2.1.3.18185-1mamba
- update to 2.1.3.18185
* Wed Jun 30 2010 Automatic Build System <autodist@mambasoft.it> 2.1.2.18118-3mamba
- automatic rebuild by autodist
* Wed Jan 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.2.18118.0-2mamba
- fix symlink to client binaries
- changes to support automatic rebuilds
* Tue May 12 2009 gil <puntogil@libero.it> 2.1.2.18118.0-1mamba
- package created by autospec