From 916743ed1055215ca5aaebc106604776cb76a700 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Thu, 14 Sep 2006 20:52:35 +0000 Subject: [PATCH] - Now RPMs are created okay from the spec file git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1160 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 2 +- distro/rpm/{ => SPECS}/sgpemv2-0.9b.spec | 18 ++++++++++++++---- distro/rpm/readme.txt | 12 ++++++++++++ 3 files changed, 27 insertions(+), 5 deletions(-) rename distro/rpm/{ => SPECS}/sgpemv2-0.9b.spec (88%) create mode 100644 distro/rpm/readme.txt diff --git a/Makefile.am b/Makefile.am index eaeaa75..3614e64 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,7 +79,7 @@ macros = \ distro_files = \ distro/deb/control-v0.9b \ distro/ebuild/sgpemv2-0.9b.ebuild \ - distro/rpm/sgpemv2-0.9b.spec + distro/rpm/SPECS/sgpemv2-0.9b.spec EXTRA_DIST += \ config/config.rpath \ diff --git a/distro/rpm/sgpemv2-0.9b.spec b/distro/rpm/SPECS/sgpemv2-0.9b.spec similarity index 88% rename from distro/rpm/sgpemv2-0.9b.spec rename to distro/rpm/SPECS/sgpemv2-0.9b.spec index 0d717a7..f3fe096 100644 --- a/distro/rpm/sgpemv2-0.9b.spec +++ b/distro/rpm/SPECS/sgpemv2-0.9b.spec @@ -37,8 +37,7 @@ URL: http://www.smoking-gnu.net/xhtml/projects.php?sgpemv2 Packager: Paolo Santi BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define _sourcedir %(curdir="`pwd`"; echo "$curdir") -%define _builddir %(curdir="`pwd`"; echo "$curdir") +%define _topdir %(curdir="`pwd`"; echo "$curdir") %description SGPEM is an Italian acronym, standing for "Simulatore della Gestione @@ -83,12 +82,23 @@ make make pdf %install -cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}/build +# create docdir: +documents="$RPM_BUILD_ROOT%{_docdir}/%{name}" +mkdir -p "${documents}" + +# install standard documentation: +cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} +cp AUTHORS COPYING NEWS ChangeLog "${documents}" + +# install everything else +cd build make DESTDIR="${RPM_BUILD_ROOT}/${_prefix}" install-strip +# install also pdf manuals +cp doc/sgpem2uman.pdf doc/sgpem2dman.pdf "${documents}" + %files %defattr(-,root,root) -%doc README AUTHORS ChangeLog NEWS doc/sgpem2uman.pdf doc/sgpem2dman.pdf # This works correctly because we're using a build root: / diff --git a/distro/rpm/readme.txt b/distro/rpm/readme.txt new file mode 100644 index 0000000..696289a --- /dev/null +++ b/distro/rpm/readme.txt @@ -0,0 +1,12 @@ + Building RPMs +----------------- + +Launch the build process like: + + rpmbuild -bb SPECS/sgpemv2-$(version).spec + +where $(version) is the version you want to build +a spec for. You'll need to put the source tbz2 into SOURCES. + +**** TODO: **** + - Explicitly list runtime dependencies