sgpemv2/distro/rpm/SPECS/sgpemv2-1.0.spec

115 lines
3.5 KiB
RPMSpec
Raw Normal View History

# 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: 1.0
Release: 1.%{disttag}
Copyright: GPL-2
Group: Applications/Engineering
Source0: http://www.smoking-gnu.net/res/tar-pit/sgpemv2/%{name}-%{version}.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 _topdir %(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 \
--disable-rpath \
--disable-static \
--disable-visibility-support
make
make pdf
%install
# 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)
# 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