# HG changeset patch # User ladanyi # Date 1118744797 0 # Node ID e427615afb48124be941c74d767621332198fe1c # Parent b9818eea0550ff3f9a753bb71b744f437db32b94 added support for generating rpms (completely untested though) diff -r b9818eea0550 -r e427615afb48 Makefile.am --- a/Makefile.am Tue Jun 14 10:18:12 2005 +0000 +++ b/Makefile.am Tue Jun 14 10:26:37 2005 +0000 @@ -2,6 +2,7 @@ EXTRA_DIST = \ LICENSE \ + lemon.spec \ autopackage/default.apspec.in \ config/cxxflags.m4 \ config/lp.m4 \ @@ -52,4 +53,16 @@ $(MAKE) $(AM_MAKEFLAGS) maintainer-clean -rm -f $(MRPROPERFILES) -.PHONY: doc benchmark mrproper +rpm: dist + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz + @rm -f $(PACKAGE)-$(VERSION).tar.gz + +dist-bz2: dist + zcat $(PACKAGE)-$(VERSION).tar.gz | \ + bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2 + +distcheck-bz2: distcheck + zcat $(PACKAGE)-$(VERSION).tar.gz | \ + bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2 + +.PHONY: doc benchmark mrproper rpm dist-bz2 distcheck-bz2 diff -r b9818eea0550 -r e427615afb48 configure.ac --- a/configure.ac Tue Jun 14 10:18:12 2005 +0000 +++ b/configure.ac Tue Jun 14 10:26:37 2005 +0000 @@ -48,6 +48,7 @@ AC_CONFIG_FILES([ Makefile +lemon.spec autopackage/default.apspec doc/Makefile doc/Doxyfile diff -r b9818eea0550 -r e427615afb48 lemon.spec.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lemon.spec.in Tue Jun 14 10:26:37 2005 +0000 @@ -0,0 +1,43 @@ +Summary: A C++ template library aimed at combinatorial optimization tasks. +Name: @PACKAGE_TARNAME@ +Version: @PACKAGE_VERSION@ +Release: 1 +License: Boost +URL: http://lemon.cs.elte.hu +Source0: %{name}-%{version}.tar.gz +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-root +Requires: glpk +BuildRequires: glpk-devel + +%description +LEMON stands for Library of Efficient Models and +Optimization in Networks. It is a C++ template +library aimed at combinatorial optimization tasks, +especially those working with graphs and networks. + +%prep +%setup -q + +%build +%configure +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_includedir}/%{name} +%{_libdir}/lib* +%{_libdir}/pkgconfig/lemon.pc +%doc %{_datadir}/doc/%{name}-%{version} +%doc AUTHORS COPYING LICENSE NEWS README