diff --git a/Makefile.am b/Makefile.am index 3614e64..15fd2ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,9 +77,12 @@ macros = \ m4/linkingflags.m4 distro_files = \ - distro/deb/control-v0.9b \ + distro/deb/control-file-v0.9b \ + distro/deb/build.sh \ + distro/deb/readme.txt \ distro/ebuild/sgpemv2-0.9b.ebuild \ - distro/rpm/SPECS/sgpemv2-0.9b.spec + distro/rpm/SPECS/sgpemv2-0.9b.spec \ + distro/rpm/readme.txt EXTRA_DIST += \ config/config.rpath \ diff --git a/distro/deb/build.sh b/distro/deb/build.sh new file mode 100755 index 0000000..51e7522 --- /dev/null +++ b/distro/deb/build.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +curdir="$(pwd)" + +if [ "${1}" == "" ]; then + echo "You need to pass the control file as the first parameter of this script." + echo "Usage: ./build.sh " + exit -1 +fi + +pkgname="$( awk '/^Package/ { print $2; }' "${1}" )" +version="$( awk '/^Version/ { print $2; }' "${1}" )" + +echo "Building debian package from ${1}." + +tarname="${pkgname}-${version}.tar.bz2" +if [ ! -f "${tarname}" ]; then + echo "Please put the source package ${tarname} in this directory and launch me again." + exit -1 +fi + +tar -xvjf "${tarname}" +cd "${pkgname}-${version}" + +mkdir =build +cd =build + +CXXFLAGS="-O3 -pipe" ../configure --disable-tests --disable-debug --prefix=/usr +make +make pdf + +destdir="${curdir}/inst-root" + +make DESTDIR="${destdir}" install-strip + +docdir="${destdir}/usr/share/doc/${pkgname}-${version}" +mkdir -p "${docdir}" +cp doc/sgpem2uman.pdf doc/sgpem2dman.pdf "${docdir}" + +cd .. +for i in AUTHORS NEWS README COPYING ChangeLog; do + gzip -c "${i}" > "${docdir}/${i}.gz" +done + +cd ${curdir} +mkdir -p "${destdir}/DEBIAN" +cp "$1" "${destdir}/DEBIAN/control" + +dpkg -b "${destdir}" . + +rm -rf "${pkgname}-${version}" +# rm -rf "${destdir}" diff --git a/distro/deb/control-file-v0.9b b/distro/deb/control-file-v0.9b new file mode 100644 index 0000000..10b65ad --- /dev/null +++ b/distro/deb/control-file-v0.9b @@ -0,0 +1,22 @@ +Package: sgpemv2 +Version: 0.9b +Section: misc +Priority: optional +Architecture: i386 +Pre-Depends: libstdc++6 +Depends: libgtkmm-2.4-1c2a, libglademm-2.4-1c2a, libxml2 (>= 2.6.10), libcairo, python (>= 2.3) +Installed-Size: 3049.85 +Maintainer: Marco Trevisan +Provides: sgpemv2 +Description: A graphical process management simulator with educational purposes. + . + 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. diff --git a/distro/deb/control-v0.9b b/distro/deb/control-v0.9b deleted file mode 100644 index 8f2c3e5..0000000 --- a/distro/deb/control-v0.9b +++ /dev/null @@ -1,23 +0,0 @@ -Package: sgpemv2 -Version: 0.9b -Section: misc -Priority: optional -Architecture: i386 ppc -Pre-Depends: libstdc++6 -Depends: libgtkmm-2.4-1c2a, libglademm-2.4-1c2a, libxml2 (>= 2.6.10), libcairo, python (>= 2.3) -Installed-Size: 3049.85 -Maintainer: Marco Trevisan -Provides: sgpemv2 -Description: A graphical process management simulator for a - multitasking computer, developed with educational - aims for Operating Systems courses at universities -. -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. diff --git a/distro/deb/readme.txt b/distro/deb/readme.txt new file mode 100644 index 0000000..015aeea --- /dev/null +++ b/distro/deb/readme.txt @@ -0,0 +1,15 @@ + .deb files creation + +++++++++++++++++++ + +To create a debian package from a control file: + + * launch the script in this directory "./build.sh", + with the control file as a parameter. + * wait a lot of time + * cross fingers + * wait some more time + * uncross fingers (before they decide to go and + find a new job as tip-tap dancers in Siberia) + * rejoice! you've a package. + +For doubts or envy, tell Matteo.