added support for generating rpms (completely untested though)
authorladanyi
Tue, 14 Jun 2005 10:26:37 +0000
changeset 1483e427615afb48
parent 1482 b9818eea0550
child 1484 a3484f00a5f0
added support for generating rpms (completely untested though)
Makefile.am
configure.ac
lemon.spec.in
     1.1 --- a/Makefile.am	Tue Jun 14 10:18:12 2005 +0000
     1.2 +++ b/Makefile.am	Tue Jun 14 10:26:37 2005 +0000
     1.3 @@ -2,6 +2,7 @@
     1.4  
     1.5  EXTRA_DIST = \
     1.6  	LICENSE \
     1.7 +	lemon.spec \
     1.8  	autopackage/default.apspec.in \
     1.9  	config/cxxflags.m4 \
    1.10  	config/lp.m4 \
    1.11 @@ -52,4 +53,16 @@
    1.12  	$(MAKE) $(AM_MAKEFLAGS) maintainer-clean
    1.13  	-rm -f $(MRPROPERFILES)
    1.14  
    1.15 -.PHONY: doc benchmark mrproper
    1.16 +rpm: dist
    1.17 +	rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
    1.18 +	@rm -f $(PACKAGE)-$(VERSION).tar.gz
    1.19 +
    1.20 +dist-bz2: dist
    1.21 +	zcat $(PACKAGE)-$(VERSION).tar.gz | \
    1.22 +	bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
    1.23 +
    1.24 +distcheck-bz2: distcheck
    1.25 +	zcat $(PACKAGE)-$(VERSION).tar.gz | \
    1.26 +	bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2
    1.27 +
    1.28 +.PHONY: doc benchmark mrproper rpm dist-bz2 distcheck-bz2
     2.1 --- a/configure.ac	Tue Jun 14 10:18:12 2005 +0000
     2.2 +++ b/configure.ac	Tue Jun 14 10:26:37 2005 +0000
     2.3 @@ -48,6 +48,7 @@
     2.4  
     2.5  AC_CONFIG_FILES([
     2.6  Makefile
     2.7 +lemon.spec
     2.8  autopackage/default.apspec
     2.9  doc/Makefile
    2.10  doc/Doxyfile
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/lemon.spec.in	Tue Jun 14 10:26:37 2005 +0000
     3.3 @@ -0,0 +1,43 @@
     3.4 +Summary: A C++ template library aimed at combinatorial optimization tasks.
     3.5 +Name: @PACKAGE_TARNAME@
     3.6 +Version: @PACKAGE_VERSION@
     3.7 +Release: 1
     3.8 +License: Boost
     3.9 +URL: http://lemon.cs.elte.hu
    3.10 +Source0: %{name}-%{version}.tar.gz
    3.11 +Group: Development/Libraries
    3.12 +BuildRoot: %{_tmppath}/%{name}-root
    3.13 +Requires: glpk
    3.14 +BuildRequires: glpk-devel
    3.15 +
    3.16 +%description
    3.17 +LEMON stands for Library of Efficient Models and
    3.18 +Optimization in Networks. It is a C++ template
    3.19 +library aimed at combinatorial optimization tasks,
    3.20 +especially those working with graphs and networks.
    3.21 +
    3.22 +%prep
    3.23 +%setup -q
    3.24 +
    3.25 +%build
    3.26 +%configure
    3.27 +make
    3.28 +
    3.29 +%install
    3.30 +rm -rf $RPM_BUILD_ROOT
    3.31 +make DESTDIR=$RPM_BUILD_ROOT install
    3.32 +
    3.33 +%clean
    3.34 +rm -rf $RPM_BUILD_ROOT
    3.35 +
    3.36 +%post -p /sbin/ldconfig
    3.37 +
    3.38 +%postun -p /sbin/ldconfig
    3.39 +
    3.40 +%files
    3.41 +%defattr(-,root,root)
    3.42 +%{_includedir}/%{name}
    3.43 +%{_libdir}/lib*
    3.44 +%{_libdir}/pkgconfig/lemon.pc
    3.45 +%doc %{_datadir}/doc/%{name}-%{version}
    3.46 +%doc AUTHORS COPYING LICENSE NEWS README