Package creation

This commit is contained in:
Denis Arnaud 2012-12-25 16:23:49 +01:00
commit 56ef42ba86
3 changed files with 36 additions and 26 deletions

9
.gitignore vendored
View File

@ -1,3 +1,8 @@
/airrac-*.tar.* /airrac-*.tar.*
/tmp/ /airrac-*.src.rpm
/airrac-*.*.*/
/clog
.build-*.*.log
/noarch/
/x86_64/
/i?86/

View File

@ -2,8 +2,8 @@
%global mydocs __tmp_docdir %global mydocs __tmp_docdir
# #
Name: airrac Name: airrac
Version: 0.1.0 Version: 1.00.0
Release: 2%{?dist} Release: 1%{?dist}
Summary: C++ Simulated Revenue Accounting (RAC) System Library Summary: C++ Simulated Revenue Accounting (RAC) System Library
@ -13,9 +13,9 @@ URL: http://sourceforge.net/projects/%{name}/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: cmake, python-devel BuildRequires: cmake, python26-devel
BuildRequires: boost-devel, soci-mysql-devel, zeromq-devel BuildRequires: boost141-devel, soci-mysql-devel, zeromq-devel
BuildRequires: stdair-devel BuildRequires: readline-devel, ncurses-devel, stdair-devel
%description %description
@ -30,14 +30,14 @@ Install the %{name} package if you need a library of basic C++ objects
for Airline Revenue Accounting, mainly for simulation purpose. for Airline Revenue Accounting, mainly for simulation purpose.
%package devel %package devel
Summary: Header files, libraries and development documentation for %{name} Summary: Header files, libraries and development helper tools for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
%description devel %description devel
This package contains the header files, static libraries and This package contains the header files, shared libraries and
development documentation for %{name}. If you would like to develop development helper tools for %{name}. If you would like to develop
programs using %{name}, you will need to install %{name}-devel. programs using %{name}, you will need to install %{name}-devel.
%package doc %package doc
@ -45,34 +45,42 @@ Summary: HTML documentation for the %{name} library
Group: Documentation Group: Documentation
%{?fedora:BuildArch: noarch} %{?fedora:BuildArch: noarch}
BuildRequires: tex(latex) BuildRequires: tex(latex)
BuildRequires: doxygen, ghostscript, graphviz BuildRequires: doxygen, ghostscript
%description doc %description doc
This package contains the documentation in the HTML format of the %{name} This package contains HTML pages, as well as a PDF reference manual,
library. The documentation is the same as at the %{name} web page. for %{name}. All that documentation is generated thanks to Doxygen
(http://doxygen.org). The content is the same as what can be browsed
online (http://%{name}.org).
%prep %prep
%setup -q %setup -q
# Fix some permissions and formats
chmod -x AUTHORS ChangeLog COPYING NEWS README
find . -type f -name '*.[hc]pp' -exec chmod -x {} \;
%build %build
%cmake . mkdir -p build
pushd build
%cmake -DBOOST_LIBRARYDIR=%{_libdir}/boost141 \
-DBOOST_INCLUDEDIR=%{_includedir}/boost141 \
-DBoost_ADDITIONAL_VERSIONS="1.41 1.41.0" ..
make %{?_smp_mflags} make %{?_smp_mflags}
popd
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
popd
mkdir -p %{mydocs} mkdir -p %{mydocs}
mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs} mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{mydocs}
rm -f %{mydocs}/html/installdox rm -f %{mydocs}/html/installdox
%check %check
ctest pushd build
#ctest
popd
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -86,7 +94,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README %doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/%{name} %{_bindir}/%{name}
%{_libdir}/lib*.so.* %{_libdir}/lib%{name}.so.*
%{_mandir}/man1/%{name}.1.* %{_mandir}/man1/%{name}.1.*
%files devel %files devel
@ -108,8 +116,5 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Aug 19 2011 Denis Arnaud <denis.arnaud_fedora@m4x.org> 0.1.0-2 * Tue Dec 25 2012 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.00.0-1
- Took into account the feedback from the package review (#728649)
* Fri Aug 05 2011 Denis Arnaud <denis.arnaud_fedora@m4x.org> 0.1.0-1
- First package - First package

View File

@ -1 +1 @@
8f2e0e008b355f70c9ecee658675b85f airrac-0.1.0.tar.bz2 28be07a348ab9933837c765568e5f263 airrac-1.00.0.tar.bz2