2006-09-14 19:57:46 +02:00
|
|
|
|
|
|
|
# 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
|
2006-09-15 13:57:31 +02:00
|
|
|
Version: 1.0
|
2006-09-14 19:57:46 +02:00
|
|
|
Release: 1.%{disttag}
|
|
|
|
Copyright: GPL-2
|
|
|
|
Group: Applications/Engineering
|
2006-09-14 21:33:12 +02:00
|
|
|
Source0: http://www.smoking-gnu.net/res/tar-pit/sgpemv2/%{name}-%{version}.tar.bz2
|
2006-09-14 19:57:46 +02:00
|
|
|
URL: http://www.smoking-gnu.net/xhtml/projects.php?sgpemv2
|
|
|
|
Packager: Paolo Santi <psanti@studenti.math.unipd.it>
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2006-09-14 22:52:35 +02:00
|
|
|
%define _topdir %(curdir="`pwd`"; echo "$curdir")
|
2006-09-14 19:57:46 +02:00
|
|
|
|
|
|
|
%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 \
|
2006-09-15 14:09:04 +02:00
|
|
|
--disable-debug \
|
|
|
|
--disable-rpath \
|
2006-09-16 02:42:10 +02:00
|
|
|
--disable-static \
|
2006-09-15 14:09:04 +02:00
|
|
|
--disable-visibility-support
|
2006-09-14 19:57:46 +02:00
|
|
|
make
|
|
|
|
make pdf
|
|
|
|
|
|
|
|
%install
|
2006-09-14 22:52:35 +02:00
|
|
|
# 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
|
2006-09-14 20:19:34 +02:00
|
|
|
make DESTDIR="${RPM_BUILD_ROOT}/${_prefix}" install-strip
|
2006-09-14 19:57:46 +02:00
|
|
|
|
2006-09-14 22:52:35 +02:00
|
|
|
# install also pdf manuals
|
|
|
|
cp doc/sgpem2uman.pdf doc/sgpem2dman.pdf "${documents}"
|
|
|
|
|
2006-09-14 19:57:46 +02:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
# 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
|
|
|
|
|