From 0c75467a0d12330f2bdb86834439021d182bd37d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 22 Feb 2013 15:09:08 +0200 Subject: Add RedHat spec file --- binary/redhat/odb.spec | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 binary/redhat/odb.spec diff --git a/binary/redhat/odb.spec b/binary/redhat/odb.spec new file mode 100644 index 0000000..179a1e8 --- /dev/null +++ b/binary/redhat/odb.spec @@ -0,0 +1,75 @@ +%ifarch i686 +%define arch i686 +%endif + +%ifarch x86_64 +%define arch x86_64 +%endif + +Summary: ORM for C++ +Name: odb +Version: 2.2.0 +Release: 1 +License: GPLv2, GPLv3, LGPLv3 +Group: Development/Tools +URL: http://www.codesynthesis.com/products/odb/ +Source: %{name}-%{version}-%{arch}-linux-gnu.tar.bz2 +Prefix: %{_prefix} +BuildRoot: %{_tmppath}/%{name}-root +AutoReqProv: no + +%description +ODB is an object-relational mapping (ORM) system for C++. It provides +tools, APIs, and library support that allow you to persist C++ objects +to a relational database (RDBMS) without having to deal with tables, +columns, or SQL and without manually writing any of the mapping code. + +%prep +%setup -q -n %{name}-%{version}-%{arch}-linux-gnu + +%build + +# We don't want the binaries to be stripped. +# +%ifarch x86_64 +%define __os_install_post /usr/lib/rpm/brp-compress +%endif + +%install + +rm -rf ${RPM_BUILD_ROOT} + +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_docdir}/odb +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/odb +mkdir -p $RPM_BUILD_ROOT%{_libexecdir} +mkdir -p $RPM_BUILD_ROOT%{_mandir} + +cp -rL bin/* $RPM_BUILD_ROOT%{_bindir}/ +cp -rL doc/* $RPM_BUILD_ROOT%{_docdir}/odb/ +cp -rL libexec/* $RPM_BUILD_ROOT%{_libexecdir}/ +cp -rL man/* $RPM_BUILD_ROOT%{_mandir}/ +cp -rL README $RPM_BUILD_ROOT%{_docdir}/odb/ + +# Remove Debian-specific options. +# +head --lines=-6 etc/odb/default.options >$RPM_BUILD_ROOT%{_sysconfdir}/odb/default.options + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%post + +%preun + +%files +%defattr(-,root,root) +%{_bindir}/odb +%{_libexecdir}/odb +%{_mandir}/man1/odb.1.gz +%doc %{_docdir}/odb/* +%config %{_sysconfdir}/odb/default.options + +%changelog +* Fri Feb 22 2013 Boris Kolpackov + - spec file written for odb binary package -- cgit v1.1