- 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:
tchernobog 2006-09-14 17:57:46 +00:00
parent 6d54f886f1
commit f1bd513a4d
4 changed files with 115 additions and 62 deletions

View File

@ -79,7 +79,7 @@ macros = \
distro_files = \
distro/deb/control-v0.9b \
distro/ebuild/sgpemv2-0.9b.ebuild \
distro/rpm/specfile-0.9b
distro/rpm/sgpemv2-0.9b.spec
EXTRA_DIST += \
config/config.rpath \
@ -355,7 +355,7 @@ sgpemv2_SOURCES = \
src/schedulables_statistics_widget.cc \
src/schedulables_tree_widget.cc \
src/simulation_controller.cc \
src/simulation_statistics_widget.cc \
src/simulation_statistics_widget.cc \
src/simulation_widget.cc \
src/statistics_container_window.cc \
src/text_simulation.cc

View 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

View File

@ -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.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: matteo@member.fsf.org\n"
"POT-Creation-Date: 2006-09-14 14:07+0200\n"
"POT-Creation-Date: 2006-09-14 19:54+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -16,17 +16,17 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/gui_builder.cc:136
#: src/gui_builder.cc:152
msgid ""
"<b>Want to save?</b>\n"
"You'll lose your changes if you don't."
msgstr ""
#: src/gui_builder.cc:205 src/gui_builder.cc:248 src/gui_builder.cc:318
#: src/gui_builder.cc:221 src/gui_builder.cc:264 src/gui_builder.cc:334
msgid "ERROR: No registered serializer available"
msgstr ""
#: src/gui_builder.cc:210 src/gui_builder.cc:253 src/gui_builder.cc:323
#: src/gui_builder.cc:226 src/gui_builder.cc:269 src/gui_builder.cc:339
#: src/text_simulation.cc:379 src/text_simulation.cc:385
#: src/text_simulation.cc:403 src/text_simulation.cc:467
#: src/text_simulation.cc:473 src/text_simulation.cc:491
@ -35,37 +35,37 @@ msgstr ""
msgid "ERROR: "
msgstr ""
#: src/gui_builder.cc:345 src/gui_builder.cc:373
#: src/gui_builder.cc:361 src/gui_builder.cc:389
msgid ""
"<b>No CPU policy is currently selected.</b>\n"
"Please choose one before trying to configure it."
msgstr ""
#: src/gui_builder.cc:351 src/gui_builder.cc:380
#: src/gui_builder.cc:367 src/gui_builder.cc:396
msgid "Configuring CPU Policy "
msgstr ""
#: src/gui_builder.cc:439
#: src/gui_builder.cc:455
msgid "Selected CPU policy "
msgstr ""
#: src/gui_builder.cc:447
#: src/gui_builder.cc:463
msgid "<b>Impossible to select this CPU Policy.</b>\n"
msgstr ""
#: src/gui_builder.cc:453
#: src/gui_builder.cc:469
msgid "No CPU policy selected. Please select one."
msgstr ""
#: src/gui_builder.cc:501
#: src/gui_builder.cc:517
msgid "Current resource policy deselected."
msgstr ""
#: src/gui_builder.cc:503
#: src/gui_builder.cc:519
msgid "Selected resource policy "
msgstr ""
#: src/gui_builder.cc:683
#: src/gui_builder.cc:700
msgid "Filename to open: "
msgstr ""