summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulioJu2016-05-27 17:01:18 +0200
committerJulioJu2016-05-27 17:01:18 +0200
commit0278ed24769b0f584f3976a40c5bbccaac2c85af (patch)
treecf0419c952b05e81f2105a50749b599ce6a1d78b
parent9e596b374b2df2a3f2de7a6d3aa9084c6c748a72 (diff)
downloadaur-0278ed24769b0f584f3976a40c5bbccaac2c85af.tar.gz
Bugs fix
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD138
-rw-r--r--marionnet.install91
3 files changed, 115 insertions, 118 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 111126696eea..4f107305ea67 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = marionnet-trunk
pkgdesc = Educational software. It is a virtual network laboratory: it allows users to define, configure and run complex computer networks without any need for physical setup. Trunk version (with UML kernel Debian Wheezy).
pkgver = 1
- pkgrel = 1
+ pkgrel = 2
url = https://www.marionnet.org/
install = marionnet.install
arch = i686
@@ -26,10 +26,12 @@ pkgbase = marionnet-trunk
source = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgtk-2.14.2.tar.gz
source = https://www.marionnet.org/download/marionnet_from_scratch/mirror/ocamlbricks-trunk.tar.gz
source = https://www.marionnet.org/download/marionnet_from_scratch/mirror/marionnet-trunk.tar.gz
+ source = https://raw.githubusercontent.com/JulioJu/Marionnet-trunk_ArchLinux-installer/master/Makefile.patch
sha256sums = 4f81ab86258be0eea1507dd5338c8670490f8616249821e731f8ac1c64caa4a7
sha256sums = 4981abedabdc462303f345104042c88af227ccd50fd30a9bf48fd353ab02d0ba
sha256sums = 646b6de59a555b2e41960708cf4edfed571d88369d850a50e23bf4a4b17ed329
sha256sums = 610c806e595be4d56ff6cded02e8d8a3091fe211487073c02ddb5132c3b4ffb6
+ sha256sums = efb09389cc67a88b16509dec3ca3fb32f1da1f4c5808b8f2e7e2f050376bf691
pkgname = marionnet-trunk
diff --git a/PKGBUILD b/PKGBUILD
index 24083804a516..95a63968016e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,15 @@
# Contributor: JulioJu < juanes 0890 at google mail dot com >
# Maintainer : JulioJu < juanes 0890 at google mail dot com >
+# Inspirated from :
+# http://bazaar.launchpad.net/~marionnet-drivers/marionnet/trunk/view/head:/useful-scripts/marionnet_from_scratch
+# Copyright (C) 2010 2011 2012 2013 Jean-Vincent Loddo Copyright (C) 2010
+# 2011 2012 2013 Université Paris 13
+# (LGPL)
+
pkgname=('marionnet-trunk')
pkgver=1
-pkgrel=1
+pkgrel=2
pkgdesc="Educational software. It is a virtual network laboratory: it allows
users to define, configure and run complex computer networks without any need
for physical setup. Trunk version (with UML kernel Debian Wheezy)."
@@ -21,11 +27,13 @@ source=("http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.1.tar.gz"
'http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgtk-2.14.2.tar.gz'
"https://www.marionnet.org/download/marionnet_from_scratch/mirror/ocamlbricks-trunk.tar.gz"
"https://www.marionnet.org/download/marionnet_from_scratch/mirror/marionnet-trunk.tar.gz"
+ "https://raw.githubusercontent.com/JulioJu/Marionnet-trunk_ArchLinux-installer/master/Makefile.patch"
)
sha256sums=('4f81ab86258be0eea1507dd5338c8670490f8616249821e731f8ac1c64caa4a7'
'4981abedabdc462303f345104042c88af227ccd50fd30a9bf48fd353ab02d0ba'
'646b6de59a555b2e41960708cf4edfed571d88369d850a50e23bf4a4b17ed329'
- '610c806e595be4d56ff6cded02e8d8a3091fe211487073c02ddb5132c3b4ffb6')
+ '610c806e595be4d56ff6cded02e8d8a3091fe211487073c02ddb5132c3b4ffb6'
+ 'efb09389cc67a88b16509dec3ca3fb32f1da1f4c5808b8f2e7e2f050376bf691')
install=marionnet.install
# ################
@@ -60,13 +68,8 @@ build () {
LABLGTK2_DIR="${srcdir}/lablgtk-2.14.2"
MARIONNET_DIR="${srcdir}/marionnet"
OCAMLBRICK_DIR="${srcdir}/ocamlbricks"
-
- # Inspirated from :
- # http://bazaar.launchpad.net/~marionnet-drivers/marionnet/trunk/view/head:/useful-scripts/marionnet_from_scratch
- # Under
- # Copyright (C) 2010 2011 2012 2013 Jean-Vincent Loddo Copyright (C) 2010
- # 2011 2012 2013 Université Paris 13
- # (LGPL)
+ export PATH="${PREFIX}/bin:${PATH}"
+ LIB_OCAML="${PREFIX}/lib/ocaml/"
### OCAML ###
@@ -84,11 +87,6 @@ build () {
${PREFIX}/bin/ocamlobjinfo
fi
- ### PREPARE ####
-
- export PATH="${PREFIX}/bin:${PATH}"
- LIB_OCAML="${PREFIX}/lib/ocaml/"
-
# #### Liblgtk2 ###
cd "${LABLGTK2_DIR}"
./configure --prefix="${PREFIX}" \
@@ -116,22 +114,27 @@ EOF
make clean &&
make &&
make install
- ############# MARIONNET ###########
+ ############ MARIONNET ###########
+
cd "${MARIONNET_DIR}"
+
+ # Makefile patch
+
+ patch Makefile < ../Makefile.patch
+
+ # Configure CONFIGME
cat > CONFIGME <<EOF
ocaml_libraryprefix="${LIB_OCAML}"
libraryprefix="${LIB_OCAML}"
-prefix="${pkgdir}/usr/local"
-configurationprefix="\${prefix}/etc"
-documentationprefix="\${prefix}/share/doc"
-localeprefix="\${prefix}/share/locale"
+prefix="/usr"
+prefixInstall="${pkgdir}/usr"
+configurationprefix="${pkgdir}/etc"
+documentationprefix="\${prefixInstall}/share/doc"
+localeprefix="\${prefixInstall}/share/locale"
ocaml_sources="${LIB_OCAML}/caml"
-ocaml_version=${ocaml_version}
+ocaml_version=`ocamlc -version`
EOF
-# For not have step « Ajust local » below, we can put
-# « localeprefix="\${prefix}/locale" » instead of
-# « localeprefix="\${prefix}/share/locale" »
make clean native
}
@@ -143,23 +146,23 @@ package() {
PREFIX="${srcdir}/usr/local"
MARIONNET_DIR="${srcdir}/marionnet"
export PATH="${PREFIX}/bin:${PATH}"
- LIB_OCAML="${PREFIX}/lib/ocaml"
cd ${MARIONNET_DIR}
- echo $PWD
make install
+ # Sanitize files
+
+ mv "${pkgdir}/usr/sbin/"* "${pkgdir}/usr/bin"
+ rmdir "${pkgdir}/usr/sbin/"
+
+ rm -f "${pkgdir}/usr/bin/marionnet.byte"
+ rm -f "${pkgdir}/usr/bin/marionnet-daemon.byte"
+ mv "${pkgdir}/usr/bin/marionnet.native" "${pkgdir}/usr/bin/marionnet"
+
# Build ${pkgdir}/etc/marionnet/marionnet.conf
echo "* Generating ${pkgdir}/etc/marionnet/marionnet.conf"
- if [[ -f ${pkgdir}/usr/local/share/marionnet/marionnet.conf ]]; then
- MARIONNET_DOT_CONF=${pkgdir}/usr/local/share/marionnet/marionnet.conf
- elif [[ -f ${pkgdir}/usr/local/etc/marionnet/marionnet.conf ]]; then
- MARIONNET_DOT_CONF=${pkgdir}/usr/local/etc/marionnet/marionnet.conf
- else
- echo "File \`marionnet.conf' not found. Exiting.";
- exit 3
- fi
+ MARIONNET_DOT_CONF=${pkgdir}/etc/marionnet/marionnet.conf
function first_installed_binary_of_list {
local i
@@ -186,18 +189,6 @@ package() {
sed -i -e "s/$i=\(.*\)/$i=$v/" $MARIONNET_DOT_CONF
done
- if [[ ! -f ${pkgdir}/etc/marionnet/marionnet.conf ]]; then
- echo "* Installing ${pkgdir}/etc/marionnet/marionnet.conf ..."
- mkdir -p ${pkgdir}/etc/marionnet/
- cp $MARIONNET_DOT_CONF ${pkgdir}/etc/marionnet/
- fi
-
- ### Make alias
-
- cd ${pkgdir}/usr/local/bin
-
- ln -sf marionnet.native marionnet
-
#### Generate Daemon ####
mkdir -p "${pkgdir}/usr/lib/systemd/system/"
@@ -211,7 +202,7 @@ Description="Marionnet daemon for graphics on virtual machines and host sockets"
[Service]
Type=simple
-ExecStart=/usr/local/sbin/marionnet-daemon.native
+ExecStart=/usr/bin/marionnet-daemon.native
KillMode=process
Restart=on-failure
@@ -219,41 +210,26 @@ Restart=on-failure
WantedBy=graphical.target
EOF
- # Fix bug https://bugs.launchpad.net/marionnet/+bug/1580349
-
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/launcher-icons/marionnet-launcher.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.cable-serial.small.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.script-analyse-3.med.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/marionnet-launcher.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.cable-serial-left-right.small.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.uml-gray.small.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.dado.24.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.resource-2.med.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.dado-no.24.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.xml-16.inv.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.script-finish.med.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.software-gray.small.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.script-start-2.med.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.cable-serial.xxl.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.diffuser.orig.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.hardware-gray.small.png
- optipng -quiet -fix ${pkgdir}/usr/local/share/marionnet/images/ico.cable-serial-left-right.large.png
-
-
- # Adjust LOCALES
- # `/usr/share/locale' vs `/usr/local/share/locale'
- # Under Arch, locales are under /usr/share/local and not
- # /usr/local/share/locale
-
- SOURCE="${pkgdir}/usr/local/share/locale"
- DEST="${pkgdir}/usr/share/locale/"
- mkdir -p ${DEST}
- # Move `marionnet.mo' files from $SOURCE to $DEST:
- echo "* Moving installed locales into ${DEST}"
- pushd >/dev/null ${SOURCE}
- find . -name "marionnet.mo" | xargs tar -cf - | tar -C ${DEST} -xf -
- popd >/dev/null
- rm -Rf ${SOURCE}
+ ### Fix bug https://bugs.launchpad.net/marionnet/+bug/1580349 ###
+
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/launcher-icons/marionnet-launcher.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.cable-serial.small.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.script-analyse-3.med.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/marionnet-launcher.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.cable-serial-left-right.small.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.uml-gray.small.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.dado.24.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.resource-2.med.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.dado-no.24.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.xml-16.inv.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.script-finish.med.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.software-gray.small.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.script-start-2.med.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.cable-serial.xxl.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.diffuser.orig.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.hardware-gray.small.png
+ optipng -quiet -fix ${pkgdir}/usr/share/marionnet/images/ico.cable-serial-left-right.large.png
+
}
diff --git a/marionnet.install b/marionnet.install
index 80bc7cf4f8f8..814b860b28b6 100644
--- a/marionnet.install
+++ b/marionnet.install
@@ -5,30 +5,18 @@
post_install () {
-# =============================================================
-# Install marionnet_kernels and filesystems
-# =============================================================
-echo "* Marionnet installation completed\n\n\n"
+echo -e "* Marionnet installation completed\n\n"
-echo -e "Post installation hook\n"
+echo -e "Post installation hook"
echo -e "——————————————————————\n"
-echo "* Downloading script marionnet_from_scratch : "
-wget http://www.marionnet.org/downloads/marionnet_from_scratch/marionnet_from_scratch
-echo "* Downlading and installing Marionnet kernels and filesystems (Linux \
-distributions Debian Lenny, Mandriva, Pinocchio, etc.)"
-echo -e "Warning! this process may take several hours! \n\n"
-echo -e "* Command : \`./marionnet_from_scratch --download-only -m trunk\`"
-chmod +x ./marionnet_from_scratch
-./marionnet_from_scratch --download-only -m trunk
-
-
-# Here $SUDO_OR_NOTHING is null
-tmpfile=$(mktemp /tmp/marionnetInstallTmpXXXXXXX)
# =============================================================
# Adjust X -nolisten tcp
# =============================================================
+# Here $SUDO_OR_NOTHING is null
+tmpfile=$(mktemp /tmp/marionnetInstallTmpXXXXXXX)
+
function remove_nolisten_assignment_from {
# global SUDO_OR_NOTHING
local i=$1
@@ -148,44 +136,75 @@ fi
if ps -A -o cmd | grep -q '^[a-zA-Z0-9/]*X.*[-]nolisten tcp'; then
echo -e "\n---"
+ echo "============================================================="
+ echo " Warning readme"
+ echo " Warning readme"
+ echo "============================================================="
echo "* Warning: your X server has been launched with the option '-nolisten tcp'"
echo " => This option should be removed from your X display manager configuration."
echo -n " Shall I try to fix it ([y]/n)? "
read z
if [[ $z != n && $z != N ]]; then
if adjust_X_display_manager; then
- echo " >>> READ THIS LINES READ THIS LINES READ THIS LINES \
- READ THIS LINES READ THIS LINES READ THIS LINES READ THIS LINES \
- WARNIN READ THIS LINES READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES READ THIS LINES WARNIN \
- READ THIS LINES READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES READ THIS LINES"
echo " Ok. File(s) changed: $CHANGED_FILES"
echo " You must restart your X display manager for the changes to take effect."
else
- echo " >>> READ THIS LINES READ THIS LINES READ THIS LINES \
- READ THIS LINES READ THIS LINES READ THIS LINES READ THIS LINES \
- WARNIN READ THIS LINES READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES READ THIS LINES WARNIN \
- READ THIS LINES READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES \
- READ THIS LINES WARNIN READ THIS LINES READ THIS LINES"
echo " Sorry, no change performed: you must edit your configuration manually."
fi
fi
else
- echo -e "\n\n\n* Your X server hasn't been launched with the option \
+ echo -e "\n* Your X server hasn't been launched with the option \
'-nolisten tcp' : good."
fi
-#### Daemon information
-echo -e "\n\n* Before start Marionnet, you must start the daemon : \n"
+# =============================================================
+# Daemon information
+# =============================================================
+
+echo "============================================================="
+echo " Daemon information "
+echo "============================================================="
+
+echo -e "* Before start Marionnet, you must start the daemon :"
echo "sudo systemctl start marionnetdaemon.service"
+# =============================================================
+# Install marionnet_kernels and filesystems
+# =============================================================
+
+echo "============================================================="
+echo " Downlading "
+echo "============================================================="
+
+echo "* Downloading script marionnet_from_scratch : "
+wget http://www.marionnet.org/downloads/marionnet_from_scratch/marionnet_from_scratch
+echo "* Downlading and installing Marionnet kernels and filesystems (Linux \
+distributions Debian Lenny, Mandriva, Pinocchio, etc.)"
+echo -e "Warning! this process may take several hours!"
+echo -e "* Command : \`./marionnet_from_scratch --download-only -m trunk \
+--prefix /opt/marionnet\`"
+chmod +x ./marionnet_from_scratch
+./marionnet_from_scratch --download-only -m trunk --prefix /opt/marionnet
+
+
+
+
+echo "* Post installation completed———\n\n\n"
+
+}
+
+post_remove() {
+echo -e "* Uninstallation process completed\n\n"
+
+echo -e "Post remove hook"
+echo -e "——————————————————————\n"
+echo "============================================================="
+echo " Remove Marionnet kernels"
+echo "============================================================="
+ rm -Rf /usr/share/marionnet
}
+
+
# vim: ft=sh