%define dataname data %define develname devel %define group Amusements/Games/RPG %define cflags CFLAGS="${CFLAGS:-%optflags -fomit-frame-pointer}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:-%optflags -fomit-frame-pointer}" ; export CXXFLAGS ; FFLAGS="${FFLAGS:-%optflags -fomit-frame-pointer}" ; export FFLAGS %define autogen %{cflags} ; %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} ; ./autogen.sh --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} Name: magus Summary: MAGUS - Create and manage Midgard characters Summary(de): MAGUS - Midgard Abenteurer Generieren Und Steigern License: GPL Group: %{group} Version: 0.9.9 Release: 0.SuSE_10.0 Url: http://midgard.berlios.de Packager: Martin Väth Distribution: SuSE 10.0 (i586) Source0: midgard.tar.bz2 Source1: ManuProC_Base.tar.bz2 Source2: ManuProC_Widgets.tar.bz2 Source3: GtkmmAddons.tar.bz2 Source4: %{name}-install.txt BuildRoot: %{_tmppath}/%{name}-%{version}-build Prefix: %{_prefix} Requires: %{name}-%{dataname} = %{version} Requires: libsigc++2 >= 1.2 Requires: gtkmm2 >= 2.0 BuildRequires: postgresql-devel BuildRequires: libsigc++2-devel >= 1.2 BuildRequires: gtkmm2-devel >= 2.0 %description This is an RPM package for MAGUS. MAGUS is a character generation and managing tool for the fantasy role playing game Midgard. The binary package %{name}-%{version} contains only the MAGUS executable and requires %{name}-%{dataname}-%{version} to run. The executable is for %{distribution} and may fail to run under other systems. To rebuild the packages from the source RPMs, you must build two times: once with --target=i586 (or whatever your architecture is) and once with --target=noarch. A description how to avoid compiling two times can be found in "/usr/src/packages/SOURCES/magus-install.txt" after installing the *.src.rpm. %description -l de Dies ist ein RPM-Paket für MAGUS. MAGUS ist ein Abenteurer Generierungs- und Steigerungstool für das Fantasyrollenspiel Midgard. Das Binär-Paket %{name}-%{version} beinhaltet nur das MAGUS-Executable und benötigt %{name}-%{dataname}-%{version}. Das Executable wurde unter %{distribution} erstellt, so dass nicht gewährleistet ist, dass dieses Paket auch unter einer anderen Konfiguration lauffähig ist. Zur Generierung der Pakete aus den Source RPMs ist der Build-Prozess zweimal durchzuführen: einmal mit --target=i586 (oder einer anderen Architektur) und einmal mit --target=noarch. Eine Beschreibung, wie man zweimaliges Kompilieren dabei vermeiden kann, befindet sich im File "/usr/src/packages/SOURCES/magus-install.txt" (nach der Installation des *.src.rpm). %package %{develname} Summary: MAGUS - Create and manage Midgard characters Summary(de): MAGUS - Midgard Abenteurer Generieren Und Steigern Group: %{group} Copyright: misc %description %{develname} MAGUS is a character generation and managing tool for the fantasy role playing game Midgard. This package contains the header files and static libraries which are needed only if you want to compile third-party programs which make use of the MAGUS libraries. (It is not needed if you want to compile MAGUS itself). %description %{develname} -l de MAGUS ist ein Abenteurer Generierungs- und Steigerungstool für das Fantasyrollenspiel Midgard. Dieses RPM Paket beinhaltet die Header-Files und statischen Bibliotheken, die Sie nur benötigen, wenn Sie Programme Dritter compilieren wollen, die die MAGUS-Bibliotheken benutzen. (Zur Compilation von MAGUS selbst ist dieses Paket nicht notwendig). %ifarch noarch %package %{dataname} Summary: MAGUS - Create and manage Midgard characters Summary(de): MAGUS - Midgard Abenteurer Generieren Und Steigern Group: %{group} Copyright: misc %description %{dataname} MAGUS is a character generation and managing tool for the fantasy role playing game Midgard. This package contains datas and help screens necessary to run MAGUS. %description %{dataname} -l de MAGUS ist ein Abenteurer Generierungs- und Steigerungstool für das Fantasyrollenspiel Midgard. Dieses RPM Paket beinhaltet die für die Benutzung von MAGUS notwendigen Daten und Hilfeseiten. %endif %prep umask 022 test -n '%{buildroot}' || { echo "Must use buildroot" ; exit 1 ; } %if %{?fake:%fake}%{!?fake:0} BUILDFAKE=1 test -e "$RPM_BUILD_DIR"/%{name}-%{version}/midgard/src/magus %else %ifarch noarch if [ -e "$RPM_BUILD_DIR"/%{name}-%{version}/midgard/src/magus ]; then BUILDFAKE=1 else BUILDFAKE= fi %else BUILDFAKE= %endif %endif if [ -n "$BUILDFAKE" ]; then %setup -T -D -c else %setup -c -q %setup -T -D -q -a 1 %setup -T -D -q -a 2 %setup -T -D -q -a 3 pushd midgard/src mv Makefile.am Makefile.am.ori sed -e 's/$(EXEEXT)//g' Makefile.am fi %build umask 022 cd "$RPM_BUILD_DIR"/%{name}-%{version} if [ ! -e midgard/src/.libs/magus ]; then cd ManuProC_Base %{autogen} make cd ../GtkmmAddons %{autogen} make cd ../ManuProC_Widgets %{autogen} make cd ../midgard %{autogen} make cd .. find . -name "*.so*" -type f | xargs strip --strip-unneeded strip midgard/src/.libs/magus midgard/src/.libs/Zufallscharakter || true fi %install umask 022 cd "$RPM_BUILD_DIR"/%{name}-%{version} test -n '%{buildroot}' test -d '%{buildroot}' && rm -rf '%{buildroot}' %{cflags} cd ManuProC_Base make DESTDIR='%{buildroot}' install cd ../midgard %{cflags} make DESTDIR='%{buildroot}' install %define magusdata %{_datadir}/magus %define magusdocs %{magusdata}/docs %ifnarch noarch # Delete unpackaged files (make rpm >= 4 happy): rm -rf '%{buildroot}%{magusdata}' %else # For some reason not all of the datas are installed: install -d -m 755 '%{buildroot}%{magusdata}' install -p -m 644 xml/*.xml '%{buildroot}%{magusdata}' install -p -m 644 src/*.png '%{buildroot}%{magusdata}' cp -a -u docs '%{buildroot}%{magusdata}' chmod -R u+w,a+rX,go-w '%{buildroot}%{magusdocs}' find '%{buildroot}%{magusdocs}' -name CVS -type d -exec rm -rf '{}' ';' -prune # Delete unpackaged files (make rpm >= 4 happy): rm -rf '%{buildroot}%{_bindir}' rm -rf '%{buildroot}%{_libdir}' rm -rf '%{buildroot}%{_includedir}' %endif %clean test -n '%{buildroot}' -a -d '%{buildroot}' && rm -rf '%{buildroot}' %ifnarch noarch %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/* %{_libdir}/*.so* %files %{develname} %defattr(-,root,root) %{_libdir}/*.a %{_libdir}/*.la %{_includedir}/* %else %files %{dataname} %defattr(-,root,root) %{magusdata} %endif %changelog * Thu Jan 07 2006 Martin Väth - Changed list of files so that several binaries will be packaged * Thu Sep 23 2004 Martin Väth - Brute-force patch of midgard/src/Makefile.am to work with automake-1.7.* * Mon Sep 06 2004 Martin Väth - Update to 0.9.7 - Use compiler option -fomit-frame-pointer * Wed Nov 26 2003 Martin Väth - minor compatibility improvements * Sun Nov 02 2003 Martin Väth - Corrected --define "fake 1" and related inconsistencies * Tue Oct 21 2003 Martin Väth - update to SuSE9.0 and magus-0.8.24 - added new options from midgard_cvs - delete unneeded files before packaging (necessary for new rpmbuild) - added --define "fake 1" option (works only with new rpmbuild) * Fri Aug 01 2003 Martin Väth - avoided unnecessary macros - changed group * Sat Jul 26 2003 Martin Väth - copy data only for --target noarch (saves time) - eliminated double calls of autogen.sh * Sat Jul 19 2003 Martin Väth - built from magus-rpm.spec and magus-rpm-data.spec