- Overhaul rpm spec file. Still under testing, don't use it yet!
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1154 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
6d54f886f1
commit
f1bd513a4d
4 changed files with 115 additions and 62 deletions
101
distro/rpm/sgpemv2-0.9b.spec
Normal file
101
distro/rpm/sgpemv2-0.9b.spec
Normal file
|
@ -0,0 +1,101 @@
|
|||
|
||||
# initial defines
|
||||
|
||||
%define is_mandrake %(test -e /etc/mandrake-release && echo 1 || echo 0)
|
||||
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
|
||||
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
|
||||
|
||||
%define dist redhat
|
||||
%define disttag rh
|
||||
|
||||
%if %is_mandrake
|
||||
%define dist mandrake
|
||||
%define disttag mdk
|
||||
%endif
|
||||
%if %is_suse
|
||||
%define dist suse
|
||||
%define disttag suse
|
||||
%endif
|
||||
%if %is_fedora
|
||||
%define dist fedora
|
||||
%define disttag rhfc
|
||||
%endif
|
||||
|
||||
%define distver %(release="`rpm -q --queryformat='%{VERSION}' %{dist}-release 2> /dev/null | tr . : | sed s/://g`" ; if test $? != 0 ; then release="" ; fi ; echo "$release")
|
||||
|
||||
# Please keep this file up-to-date for each release.
|
||||
# See: http://www.rpm.org/max-rpm/p5208.html for an explanation.
|
||||
|
||||
Summary: A graphical process management simulator for a multitasking computer
|
||||
Name: sgpemv2
|
||||
Version: 0.9b
|
||||
Release: 1.%{disttag}
|
||||
Copyright: GPL-2
|
||||
Group: Applications/Engineering
|
||||
Source0: http://www.smoking-gnu.net/res/tar-pit/sgpemv2/sgpemv2-0.9b.tar.bz2
|
||||
URL: http://www.smoking-gnu.net/xhtml/projects.php?sgpemv2
|
||||
Packager: Paolo Santi <psanti@studenti.math.unipd.it>
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define _sourcedir %(curdir="`pwd`"; echo "$curdir")
|
||||
%define _builddir %(curdir="`pwd`"; echo "$curdir")
|
||||
|
||||
%description
|
||||
SGPEM is an Italian acronym, standing for "Simulatore della Gestione
|
||||
dei Processi in un Elaboratore Multiprogrammato" (in English, "Process
|
||||
Management Simulator for a Multitasking Computer"). It was initially
|
||||
developed for use inside the "Operating Systems" teaching, part of the
|
||||
Computer Science course of the University of Padova, Italy. The aim of
|
||||
SGPEM is to provide an easy-to-use environment for simulating process
|
||||
scheduling policies, and for assigning resources in a multitasking
|
||||
computer. SGPEMv2 is an educational software, and it can help students
|
||||
to better understand the functionality of operating systems.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}
|
||||
mkdir build && cd build
|
||||
|
||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
|
||||
../configure --host=%{_host} --build=%{_build} \
|
||||
--target=%{_target_platform} \
|
||||
--program-prefix=%{?_program_prefix} \
|
||||
--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} \
|
||||
--disable-tests \
|
||||
--disable-debug
|
||||
make
|
||||
make pdf
|
||||
|
||||
%install
|
||||
cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}/build
|
||||
make DESTDIR="${RPM_BUILD_ROOT}/${_prefix}" install
|
||||
|
||||
%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:
|
||||
/
|
||||
|
||||
%clean
|
||||
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"
|
||||
|
||||
%changelog
|
||||
* Tue Sep 14 2006 - matteo (at) member.fsf.org
|
||||
- Prepare first release of SGPEMv2 and build rpm
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
# Please complete this file and keep it up-to-date for each release.
|
||||
# See: http://www.rpm.org/max-rpm/p5208.html for an explanation.
|
||||
|
||||
# todo: set the RPM_BUILD_ROOT in the preable!
|
||||
|
||||
Summary: A graphical process management simulator for a multitasking computer
|
||||
Name: sgpemv2
|
||||
Version: 0.9b
|
||||
Release: 1
|
||||
Copyright: GPL-2
|
||||
Group: Applications/
|
||||
Source: http://www.smoking-gnu.net/res/tar-pit/sgpemv2/sgpemv2-0.9b.tar.bz2
|
||||
URL: http://www.smoking-gnu.net/xhtml/projects.php?sgpemv2
|
||||
Packager: Luca Vezzaro <lvezzaro@studenti.math.unipd.it>
|
||||
|
||||
%description
|
||||
SGPEM is an Italian acronym, standing for "Simulatore della Gestione
|
||||
dei Processi in un Elaboratore Multiprogrammato" (in English, "Process
|
||||
Management Simulator for a Multitasking Computer"). It was initially
|
||||
developed for use inside the "Operating Systems" teaching, part of the
|
||||
Computer Science course of the University of Padova, Italy. The aim of
|
||||
SGPEM is to provide an easy-to-use environment for simulating process
|
||||
scheduling policies, and for assigning resources in a multitasking
|
||||
computer. SGPEMv2 is an educational software, and it can help students
|
||||
to better understand the functionality of operating systems.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
cd ${RPM_BUILD_DIR}/${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}
|
||||
mkdir build && cd build
|
||||
CXXFLAGS="-O3 -pipe" ../configure --prefix=/usr \
|
||||
--mandir=/usr/share/man --infodir=/usr/share/info \
|
||||
--datadir=/usr/share --sysconfdir=/etc \
|
||||
--localstatedir=/var/lib --disable-tests
|
||||
make
|
||||
make pdf
|
||||
|
||||
%install
|
||||
make install DESTDIR="${RPM_BUILD_ROOT}"
|
||||
|
||||
%files
|
||||
%doc README AUTHORS ChangeLog NEWS doc/sgpem2uman.pdf doc/sgpem2dman.pdf
|
||||
# TODO: add here the file list, probably using ``find'' on the
|
||||
# installation directory and then stripping the leading dot.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue