diff options
77 files changed, 2508 insertions, 17 deletions
diff --git a/pcr/blender-addon-ogre b/pcr/blender-addon-ogre deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/blender-addon-ogre +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/blender-addon-ogre/PKGBUILD b/pcr/blender-addon-ogre/PKGBUILD new file mode 100644 index 000000000..6dbe466e2 --- /dev/null +++ b/pcr/blender-addon-ogre/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +_pkgname=ogre +_pkgver=0.6.0 +_pkgverM=${_pkgver%.*} +_bldname=blender +_bldver=2.71 +_bldep=14 +_srcname=${_bldname}2$_pkgname + +pkgname=$_bldname-addon-$_pkgname +pkgver=$_pkgver +pkgrel=7 +pkgdesc="$_srcname: A addon for the ${_bldname^} which allows export to ${_pkgname^}3D formats (scene/mesh/material/skeleton) (built for the $_bldname package)" +arch=('any') +url="https://code.google.com/p/${_bldname}2$_pkgname" +license=('LGPL2.1') +depends=("$_bldname>=$_bldep:$_bldver" "$_bldname<$(($_bldep+1)):${_bldver/.*/}.$((${_bldver/*./}+1))") +source=("https://${_bldname}2$_pkgname.googlecode.com/files/${_bldname}2$_pkgname-$pkgver.zip" + 'http://www.gnu.org/licenses/lgpl-2.1.txt') +sha512sums=('15609a6dc3f5901ec59193acb6944017cc426fa12ce658715006ba781b6c39a09f38a64c858b28f7e662dff50eccf06ec6ef6efc22e0d2876c6c77fb18c04712' + '1bca76c9f2f559a7851c278650125cd4f44a7ae4a96ceee6a6ba81d34d28fe7d6125c5ee459fef729b6a2a0eba3075c0841c8a156b3a26f66194f77f7d49151c') + +prepare() { + msg 'renaming wrong OS name' + sed -i 's|Linux|GNU/Linux|' io_export_${_pkgname}DotScene.py +} + +package() { + cd $srcdir + + a=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons/$_pkgname + b=$pkgdir/usr/share/licenses/$pkgname + + install -vd $a && cp -va io_export_${_pkgname}DotScene.py $a/__init__.py + install -vd $b && install -vm644 $startdir/lgpl-2.1.txt $b/LGPL-v2.1 +} diff --git a/pcr/cambozola b/pcr/cambozola deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/cambozola +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/cambozola/PKGBUILD b/pcr/cambozola/PKGBUILD new file mode 100644 index 000000000..972a175c8 --- /dev/null +++ b/pcr/cambozola/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer (Arch): Ernie Brodeur <ebrodeur@ujami.net> +pkgname=cambozola +pkgver=0.92 +pkgrel=1 +pkgdesc="A java servlet for streaming JPEG's from ip Cameras." +url="http://www.charliemouse.com:8080/code/cambozola/" +arch=('x86_64' 'i686') +license=('GPL') +depends=('java-runtime') +makedepends=('apache-ant') +source=("${url}${pkgname}-${pkgver}.tar.gz") +md5sums=('602daba851e726e2399445fda3ca718f') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ant +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + mkdir -p ${pkgdir}/usr/share/${pkgname} + cp dist/* ${pkgdir}/usr/share/${pkgname}/ +} + +# vim:set ts=2 sw=2 et: + diff --git a/pcr/collada-dom b/pcr/collada-dom deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/collada-dom +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/collada-dom/PKGBUILD b/pcr/collada-dom/PKGBUILD new file mode 100644 index 000000000..d4756c879 --- /dev/null +++ b/pcr/collada-dom/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +pkgname=collada-dom +pkgver=2.4.0 +pkgrel=4 +pkgdesc="An API that provides a C++ object representation of a ${pkgname::7} XML instance document" +url=http://sourceforge.net/projects/$pkgname +license=MIT +arch=( + mips64el + x86_64 + i686 +) +depends=( + boost-libs + libxml2 + pcre +) +makedepends=( + boost + cmake +) +source=http://downloads.sf.net/$pkgname/$pkgname-$pkgver-libsrc.tgz +sha512sums=4c8cdc159acc89564b46615a0bc73a5ba84a1a5aa41d38661cd0e33a705ce5fd032e9a308fc89f93ec10620892067d757cbff8f1b9ce53da7626ea0e27b0eda5 + +prepare() { + cd $srcdir/$pkgname-$pkgver-libsrc + + [[ -d build ]] && rm -vr build + mkdir -v build +} + +build() { + cd $srcdir/$pkgname-$pkgver-libsrc/build + cmake .. -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd $srcdir/$pkgname-$pkgver-libsrc/build + make DESTDIR=$pkgdir install + + a=$pkgdir/usr/share/licenses/$pkgname + + install -vd $a && cp -va ../{dom/license.txt,License_Folder/license_e.txt} $a +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/mednafen-server b/pcr/mednafen-server deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/mednafen-server +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/mednafen-server/PKGBUILD b/pcr/mednafen-server/PKGBUILD new file mode 100644 index 000000000..e29c0bea9 --- /dev/null +++ b/pcr/mednafen-server/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +pkgname=mednafen-server +_pkgname=${pkgname%-server} +pkgver=0.5.2 +pkgrel=1 +pkgdesc='A server multi-system gaming emulator' +url=http://$_pkgname.sourceforge.net/ +license=GPL +arch=('i686' 'x86_64' 'mips64el') +backup=etc/$pkgname/standard.conf +source=(http://downloads.sourceforge.net/project/$_pkgname/${_pkgname^}-Server/$pkgver/$pkgname-$pkgver.tar.gz + $pkgname.service) +sha512sums=('7ca094c7123e147bfaaedc254958fa664b7d71b141f8409b251bb646e04a7a6a5bc7f01ecac049b3895334a09a02e7449ac90e6db1d469322dba44f7281edf15' + 'cd3d19b789ec7f62c4b8f5fe0f93e7836fab5406a3416434701caf6404cce02c7223dcb8b82bd1e4b00bdcf4df623f0cd44f850a7f79a7be73e04c0804972700') + +build() { + cd $srcdir/$pkgname + ./configure --prefix=/usr + make +} + +package() { + cd $srcdir/$pkgname + make DESTDIR=$pkgdir install + install -Dm644 standard.conf $pkgdir/etc/$pkgname/standard.conf + install -Dm644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service +} diff --git a/pcr/mednafen-server/mednafen-server.service b/pcr/mednafen-server/mednafen-server.service new file mode 100644 index 000000000..9ee392432 --- /dev/null +++ b/pcr/mednafen-server/mednafen-server.service @@ -0,0 +1,9 @@ +[Unit] +Description=Mednafen Server Daemon +After=network.target + +[Service] +ExecStart=/usr/bin/mednafen-server /etc/mednafen-server/standard.conf >/var/log/mednafen-server.log 2>/var/log/mednafen-server.log.2 + +[Install] +WantedBy=multi-user.target diff --git a/pcr/mitsuba b/pcr/mitsuba deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/mitsuba +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/mitsuba/PKGBUILD b/pcr/mitsuba/PKGBUILD new file mode 100644 index 000000000..7ae5856f8 --- /dev/null +++ b/pcr/mitsuba/PKGBUILD @@ -0,0 +1,148 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +_build_pkg=yes +_build_add=yes + +[[ $_build_pkg != yes && $_build_pkg != no ]] && _build_pkg=yes +[[ $_build_add != yes && $_build_add != no ]] && _build_add=yes +[[ $_build_pkg == no && $_build_add == no ]] && _build_add=yes + +_pkgname=mitsuba +_pkgver=0.5.0 +_pkgverM=${_pkgver%.*} +_pkgdat=20140225 +_pkgrev=2030 +_pkgrel=6 +_bldname=blender +_bldver=2.71 +_bldep=14 +_addname=$_bldname-addon-$_pkgname +_addver=0.3.0 # __init__.py:bl_info>version +_adddat=20140722 +_addrev=61 +_addrel=4 +_pyver=3.4 + +pkgbase=$_pkgname +[[ $_build_pkg == yes ]] && pkgname+=("$_pkgname") +[[ $_build_add == yes ]] && pkgname+=("$_bldname-addon-$_pkgname") +pkgver=$_pkgver.$_pkgrev +pkgrel=$_pkgrel +arch=('i686' 'x86_64' 'mips64el') +url="https://www.$_pkgname-renderer.org" +[[ $_build_pkg == yes ]] && depends=('boost-libs' 'collada-dom' 'glew' 'libxxf86vm' 'openexr' 'qt4' 'xerces-c') +[[ $_build_pkg == yes ]] && makedepends=('boost' 'cmake' 'eigen3' 'mercurial' 'python') +[[ $_build_pkg == yes ]] && source+=("$_pkgname-$_pkgver.$_pkgrev.tar.bz2::${url}/repos/$_pkgname/archive/$_pkgrev.tar.bz2") +[[ $_build_add == yes ]] && source+=("$_addname-$_addver.$_addrev.tar.bz2::${url}/repos/exporters/$_pkgname-$_bldname/archive/$_addrev.tar.bz2" + 'http://www.gnu.org/licenses/gpl-2.0.txt') +[[ $_build_pkg == yes ]] && sha512sums+=('cb30ca95ada36bec56aca3af55af19511ae64f05631d3e221308dee6fe04a1de08daab6e89c9025c8f6492731ed586d40d92f2168c5d49a060f31cd0afc7d0a7') +[[ $_build_add == yes ]] && sha512sums+=('cd812c46ccfb4673a5d170c96e4aa8275d136ef4ae300b50944aac69ff646e9118afa78a9a1f22e7b03fcc1e4fa496c889f59d8bf40836e27d023548061a4491' + 'aee80b1f9f7f4a8a00dcf6e6ce6c41988dcaedc4de19d9d04460cbfb05d99829ffe8f9d038468eabbfba4d65b38e8dbef5ecf5eb8a1b891d9839cda6c48ee957') + +_prepare_mitsuba() { + msg 'Renaming source dir' + mv -v $srcdir/$_pkgname-???????????? $srcdir/$_pkgname-$_pkgver.$_pkgrev + + cd $srcdir/$_pkgname-$_pkgver.$_pkgrev + + msg 'renaming wrong OS name' + _OS=$(uname -o) + [[ $_OS == GNU ]] && sed -i 's|Linux|GNU|I' src/libcore/plugin.cpp + [[ $_OS == GNU/Linux ]] && sed -i 's|Linux,|GNU/Linux,|' src/libcore/plugin.cpp + [[ $_OS == GNU/kFreeBSD ]] && sed -i 's|Linux,|GNU/kFreeBSD,|' src/libcore/plugin.cpp + sed -i 's|Linux/|Linux,| + s|Linux|GNU/Linux| + ' include/$_pkgname/core/{atomic,fstream,random,thread}.h + + msg 'removing Open Source term' + sed -i 's|free-software/open-source|free-software| + ' include/$_pkgname/core/quad.h + + msg 'fixing headers' + sed -i 's|boost/spirit/home/phoenix/bind/bind_member_function.hpp|boost/phoenix/bind/preprocessed/bind_member_function.hpp| + s|boost/spirit/home/phoenix/bind/bind_member_variable.hpp|boost/phoenix/bind/bind_member_variable.hpp| + s|boost/spirit/home/phoenix/statement/if.hpp|boost/phoenix/statement/if.hpp| + ' src/bsdfs/irawan.h + sed -i 's|boost/spirit/home/phoenix/statement/if.hpp|boost/phoenix/statement/if.hpp| + ' src/bsdfs/irawan.cpp + + [[ -d build ]] && rm -vr build + mkdir -v build +} + +_prepare_blender-addon-mitsuba() { + msg 'Renaming addon dir' + mv -v $srcdir/$_pkgname-$_bldname-???????????? $srcdir/$_addname-$_addver.$_addrev +} + +prepare() { + [[ $_build_pkg == yes ]] && _prepare_mitsuba + [[ $_build_add == yes ]] && _prepare_blender-addon-mitsuba +} + +_build_mitsuba() { + cd $srcdir/$_pkgname-$_pkgver.$_pkgrev/build + + [[ $CARCH == x86_64 ]] && _SSE=ON || _SSE=OFF + # i686: MTS_SSE disabled + + cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ + -DBoost_PYTHON_LIBRARY=/usr/lib/libboost_python${_pyver::1}.so\ + -DMTS_SSE=$_SSE\ + -DPYTHON_INCLUDE_DIR=/usr/include/python${_pyver}m\ + -DPYTHON_LIBRARY=/usr/lib/libpython${_pyver}m.so + make +} +[[ $_build_pkg == yes ]] && build() { _build_mitsuba; } + +package_mitsuba() { + pkgdesc='A physically based renderer' + license=('GPL3') + optdepends=('python: Python bindings' + "$_addname: ${_bldname^} addon exporter and renderer") + install="$_pkgname.install" + + cd $srcdir/$_pkgname-$_pkgver.$_pkgrev/build + make DESTDIR=$pkgdir install + + b=$pkgdir/usr/share/licenses/$pkgname + + install -vd $b && install -vm644 ../doc/license.txt $b/GPL-v3.0 + + msg 'fixing files and folders location' + a=$pkgdir/usr + b=$srcdir/$_pkgname-$_pkgver.$_pkgrev + install -vd $a/{bin,lib/python$_pyver/lib-dynload,share/{applications,$_pkgname,pixmaps}} + install -vm644 $b/data/linux/$_pkgname.desktop $a/share/applications + install -vm644 $b/src/mtsgui/resources/${_pkgname}48.png $a/share/pixmaps + mv -v $a/{m{itsuba,ts{gui,import,srv,util}},bin} + mv -v $a/lib{$pkgname-{bidir,core,hw,render}.so,} + mv -v $a/{{data,plugins},share/$_pkgname} + mv -v $a/{python/mitsuba.so,lib/python$_pyver/lib-dynload} + mv -v $a/{sdk/include,} + rmdir -v $a/{python,sdk} +} + +package_blender-addon-mitsuba() { + pkgver=$_addver.$_addrev.v$_bldver + pkgrel=$_addrel + pkgdesc="A addon for the ${_bldname^} which allows render and export with Mitsuba (built for the $_bldname package)" + arch=('any') + license=('GPL2') + depends=("$_pkgname>=$_pkgver" "$_pkgname<${_pkgver/.*/}.$((${_pkgverM#*.}+1)).$((${_pkgver/*./}==0))" "$_bldname>=$_bldep:$_bldver" "$_bldname<$(($_bldep+1)):${_bldver/.*/}.$((${_bldver/*./}+1))") + makedepends=() + + cd $srcdir/$_addname-$_addver.$_addrev + + msg 'fixing binary path' + sed -i 's|'"'default'"': efutil.find_config_value('"'mitsuba', 'defaults', 'binary_path', ''"')|'"'default'"': '"'/usr/bin'"'| + ' mtsblend/properties/engine.py + + a=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons + b=$pkgdir/usr/share/licenses/$pkgname + + install -vd $a && cp -va mtsblend $a/$_pkgname + install -vd $b && install -vm644 $startdir/gpl-2.0.txt $b/GPL-v2.0 +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/mitsuba/mitsuba.install b/pcr/mitsuba/mitsuba.install new file mode 100644 index 000000000..724bfce00 --- /dev/null +++ b/pcr/mitsuba/mitsuba.install @@ -0,0 +1,13 @@ +post_install() { + update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/pcr/nexuiz b/pcr/nexuiz deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/nexuiz +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/nexuiz-data b/pcr/nexuiz-data deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/nexuiz-data +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/nexuiz-data/PKGBUILD b/pcr/nexuiz-data/PKGBUILD new file mode 100644 index 000000000..c6ab172b7 --- /dev/null +++ b/pcr/nexuiz-data/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor (Arch): Xyne +# Contributor (Arch): Rick Chen (stuffcorpse) +# Contributor (Arch): Jaroslaw Swierczynski <swiergot@aur.archlinux.org> +# Contributor (Arch): Roman Kyrylych <Roman.Kyrylych@gmail.com> +# Contributor (Arch): Camille Moncelier <pix@devlife.org> + +pkgname=nexuiz-data +_pkgsourcename=nexuiz +pkgver=2.5.2 +_zipver=252 +pkgrel=3.1 +arch=('any') +pkgdesc="Nexuiz game data" +conflicts=('nexuiz<2.5.1-3') +url="http://www.alientrap.org/games/nexuiz" +license=("GPL") +source=(http://downloads.sourceforge.net/${_pkgsourcename}/${_pkgsourcename}-${_zipver}.zip) +md5sums=('d750bc328e58df8492f8d88bdcf818cb') + +package() { + _nexdir="$pkgdir/opt/nexuiz" + + _install_dir $srcdir/Nexuiz/Docs $_nexdir/docs + _install_dir $srcdir/Nexuiz/data $_nexdir/data + _install_dir $srcdir/Nexuiz/havoc $_nexdir/havoc + _install_dir $srcdir/Nexuiz/server $_nexdir/server + + find $_nexdir/server -name "*_windows.bat" -exec rm {} \; + find $_nexdir/server -name "*_mac.sh" -exec rm {} \; +} + +function _install_dir { + _src_dir=$1 + _dest_dir=$2 + _n=${#_src_dir} + for _file in $(find $_src_dir -type f) + do + _dest_file=${_dest_dir}${_file:$_n} + install -Dm644 $_file $_dest_file + done +} diff --git a/pcr/nexuiz/PKGBUILD b/pcr/nexuiz/PKGBUILD new file mode 100644 index 000000000..0d5cd1afc --- /dev/null +++ b/pcr/nexuiz/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor (Arch): Xyne +# Contributor (Arch): Rick Chen (stuffcorpse) +# Contributor (Arch): Jaroslaw Swierczynski <swiergot@aur.archlinux.org> +# Contributor (Arch): Roman Kyrylych <Roman.Kyrylych@gmail.com> +# Contributor (Arch): Camille Moncelier <pix@devlife.org> + +pkgname=nexuiz +pkgver=2.5.2 +_zipver=252 +pkgrel=3.1 +arch=('i686' 'x86_64' 'mips64el') +pkgdesc="A free software first person shooter" +url="http://www.alientrap.org/games/nexuiz" +license=("GPL") +depends=('alsa-lib' 'curl' 'libjpeg>=8' 'libmodplug' 'libvorbis' 'libxpm' 'libxxf86dga' 'libxxf86vm' 'sdl' 'nexuiz-data' 'libpng>=1.4.0') +makedepends=('mesa') +source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${_zipver}.zip \ + nexuiz-dedicated nexuiz-glx nexuiz-sdl nexuiz-glx.desktop \ + nexuiz-sdl.desktop nexuiz.png libpng14.patch) +md5sums=('d750bc328e58df8492f8d88bdcf818cb' + '19bfaa6e891d3309783e8366db485474' + '4d0ee9282a6fe153f82f7797decfd585' + '3e5ea741e8d55df8e7691c797c81ffa7' + '310f0577c39391f2d2f17cea446ce269' + '4561d3c5be4801399af515faf82ebcba' + '442fb62670bbe0a1b5370461052051a3' + '60964348924ff777a92dbb171a86a1ed') + +build() { + _nexdir="$pkgdir/opt/nexuiz" + _enginesource_date="20091001" + mkdir -p "$_nexdir" || return 1 + + cd $srcdir/Nexuiz + bsdtar -x -f sources/enginesource${_enginesource_date}.zip || return 1 + cd darkplaces + patch -Np1 -i ${srcdir}/libpng14.patch || return 1 + # patch -p1 < "$srcdir/nexuiz-libjpeg-fix.patch" || return 1 + + # here's a working kludge to build all three binaries at once but don't use it ;) + # make CPUOPTIMIZATIONS="${CFLAGS}" nexuiz || make CPUOPTIMIZATIONS="${CFLAGS}" nexuiz || return 1 + + # build the binaries separately instead to avoid truncated files + make CPUOPTIMIZATIONS="${CFLAGS}" DP_LINK_TO_LIBJPEG=1 cl-nexuiz || return 1 + make CPUOPTIMIZATIONS="${CFLAGS}" DP_LINK_TO_LIBJPEG=1 sdl-nexuiz || return 1 + make CPUOPTIMIZATIONS="${CFLAGS}" DP_LINK_TO_LIBJPEG=1 sv-nexuiz || return 1 +} + +package() { + cd $srcdir/Nexuiz/darkplaces + # install the compiled binaries + install -Dm755 nexuiz-glx nexuiz-sdl nexuiz-dedicated -t $_nexdir || return 1 + + install -dm755 $pkgdir/usr/{bin,share/applications} || return 1 + install -Dm755 $srcdir/nexuiz-{glx,sdl,dedicated} -t $pkgdir/usr/bin || return 1 + install -Dm644 $srcdir/*.desktop -t $pkgdir/usr/share/applications || return 1 + install -Dm644 $srcdir/nexuiz.png $pkgdir/usr/share/pixmaps/nexuiz.png || return 1 +} diff --git a/pcr/nexuiz/libpng14.patch b/pcr/nexuiz/libpng14.patch new file mode 100644 index 000000000..d6ce5ea76 --- /dev/null +++ b/pcr/nexuiz/libpng14.patch @@ -0,0 +1,39 @@ +diff -Nur darkplaces.old/image_png.c darkplaces/image_png.c +--- darkplaces.old/image_png.c 2009-09-15 06:08:02.000000000 +0300 ++++ darkplaces/image_png.c 2010-01-28 01:23:24.000000000 +0200 +@@ -36,7 +36,7 @@ + static void* (*qpng_create_info_struct) (void*); + static void (*qpng_read_info) (void*, void*); + static void (*qpng_set_expand) (void*); +-static void (*qpng_set_gray_1_2_4_to_8) (void*); ++static void (*qpng_set_expand_gray_1_2_4_to_8) (void*); + static void (*qpng_set_palette_to_rgb) (void*); + static void (*qpng_set_tRNS_to_alpha) (void*); + static void (*qpng_set_gray_to_rgb) (void*); +@@ -61,7 +61,7 @@ + {"png_create_info_struct", (void **) &qpng_create_info_struct}, + {"png_read_info", (void **) &qpng_read_info}, + {"png_set_expand", (void **) &qpng_set_expand}, +- {"png_set_gray_1_2_4_to_8", (void **) &qpng_set_gray_1_2_4_to_8}, ++ {"png_set_expand_gray_1_2_4_to_8", (void **) &qpng_set_expand_gray_1_2_4_to_8}, + {"png_set_palette_to_rgb", (void **) &qpng_set_palette_to_rgb}, + {"png_set_tRNS_to_alpha", (void **) &qpng_set_tRNS_to_alpha}, + {"png_set_gray_to_rgb", (void **) &qpng_set_gray_to_rgb}, +@@ -110,7 +110,7 @@ + #elif defined(MACOSX) + "libpng12.0.dylib", + #else +- "libpng12.so.0", ++ "libpng14.so.0", + "libpng.so", // FreeBSD + #endif + NULL +@@ -311,7 +311,7 @@ + { + qpng_set_gray_to_rgb(png); + if (my_png.BitDepth < 8) +- qpng_set_gray_1_2_4_to_8(png); ++ qpng_set_expand_gray_1_2_4_to_8(png); + } + + if (qpng_get_valid(png, pnginfo, PNG_INFO_tRNS)) diff --git a/pcr/nexuiz/nexuiz-dedicated b/pcr/nexuiz/nexuiz-dedicated new file mode 100644 index 000000000..bf517cce7 --- /dev/null +++ b/pcr/nexuiz/nexuiz-dedicated @@ -0,0 +1,3 @@ +#!/bin/sh +cd /opt/nexuiz +./nexuiz-dedicated $@ diff --git a/pcr/nexuiz/nexuiz-glx b/pcr/nexuiz/nexuiz-glx new file mode 100644 index 000000000..5fad4db07 --- /dev/null +++ b/pcr/nexuiz/nexuiz-glx @@ -0,0 +1,3 @@ +#!/bin/sh +cd /opt/nexuiz +./nexuiz-glx $@ diff --git a/pcr/nexuiz/nexuiz-glx.desktop b/pcr/nexuiz/nexuiz-glx.desktop new file mode 100644 index 000000000..8808c16db --- /dev/null +++ b/pcr/nexuiz/nexuiz-glx.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=2.5 +Encoding=UTF-8 +Name=Nexuiz (GLX) +Comment=a free open-source first person shooter +Icon=/usr/share/pixmaps/nexuiz.png +Exec=/usr/bin/nexuiz-glx +Terminal=false +StartupNotify=false +Categories=Game; diff --git a/pcr/nexuiz/nexuiz-sdl b/pcr/nexuiz/nexuiz-sdl new file mode 100644 index 000000000..36b6d5cc3 --- /dev/null +++ b/pcr/nexuiz/nexuiz-sdl @@ -0,0 +1,3 @@ +#!/bin/sh +cd /opt/nexuiz +./nexuiz-sdl $@ diff --git a/pcr/nexuiz/nexuiz-sdl.desktop b/pcr/nexuiz/nexuiz-sdl.desktop new file mode 100644 index 000000000..019970e61 --- /dev/null +++ b/pcr/nexuiz/nexuiz-sdl.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=2.5 +Encoding=UTF-8 +Name=Nexuiz (SDL) +Comment=a free open-source first person shooter +Icon=/usr/share/pixmaps/nexuiz.png +Exec=/usr/bin/nexuiz-sdl +Terminal=false +StartupNotify=false +Categories=Game; diff --git a/pcr/nexuiz/nexuiz.png b/pcr/nexuiz/nexuiz.png Binary files differnew file mode 100644 index 000000000..a0ec8b3d4 --- /dev/null +++ b/pcr/nexuiz/nexuiz.png diff --git a/pcr/noip b/pcr/noip deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/noip +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/noip/PKGBUILD b/pcr/noip/PKGBUILD new file mode 100644 index 000000000..bc5a851e8 --- /dev/null +++ b/pcr/noip/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer (Arch): Runnytu < runnytu at gmail dot com > +# Contributor (Arch): Alexander Rødseth <rodseth@gmail.com> +# Contributor (Arch): Daenyth +# Contributor (Arch): Lyle Putnam <lcputnam@amerytel.net> + +pkgname=noip +pkgver=2.1.9 +pkgrel=6 +pkgdesc='Dynamic DNS Client Updater for no-ip.com services' +arch=('x86_64' 'i686') +url='http://www.no-ip.com/downloads.php?page=linux' +license=('GPL') +install="$pkgname.install" +depends=('glibc') +source=('http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz' + 'noip.service') +sha256sums=('82b9bafab96a0c53b21aaef688bf70b3572e26217b5e2072bdb09da3c4a6f593' + '624553d92d69bb76cb457a056a7722dc051b5bbd17ea0e622b5cc08909019ea5') + + +prepare() { + cd "$pkgname-$pkgver-1" + + sed -i '/^#define CONFIG_FILEPATH/s/PREFIX//' noip2.c + sed -i '/^#define CONFIG_FILENAME/s/PREFIX//' noip2.c +} + +build() { + cd "$pkgname-$pkgver-1" + + cc -Wall $CLFAGS $LDFLAGS -g -Dlinux -DPREFIX=/usr noip2.c -o noip2 -Wno-unused-but-set-variable +} + +package() { + cd "$pkgname-$pkgver-1" + + install -Dm755 noip2 "$pkgdir/usr/bin/noip2" + install -Dm644 "$srcdir/$pkgname.service" \ + "$pkgdir/usr/lib/systemd/system/noip2.service" +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/noip/noip.install b/pcr/noip/noip.install new file mode 100644 index 000000000..1207f20e4 --- /dev/null +++ b/pcr/noip/noip.install @@ -0,0 +1,6 @@ +post_install() { + echo + echo 'Before running noip2 you must configure it.' + echo 'To configure noip2 run the command "noip2 -C -Y"' + echo +} diff --git a/pcr/noip/noip.service b/pcr/noip/noip.service new file mode 100644 index 000000000..2ad0ba867 --- /dev/null +++ b/pcr/noip/noip.service @@ -0,0 +1,10 @@ +[Unit] +Description=No-IP Dynamic DNS Update Client +After=network.target + +[Service] +Type=forking +ExecStart=/usr/bin/noip2 -c /etc/no-ip2.conf + +[Install] +WantedBy=multi-user.target diff --git a/pcr/openssh-knock b/pcr/openssh-knock deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/openssh-knock +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/openssh-knock/PKGBUILD b/pcr/openssh-knock/PKGBUILD new file mode 100644 index 000000000..bae0ee03d --- /dev/null +++ b/pcr/openssh-knock/PKGBUILD @@ -0,0 +1,103 @@ +# $Id: PKGBUILD 223946 2014-10-07 02:36:53Z bisson $ +# Maintainer (Arch): Gaetan Bisson <bisson@archlinux.org> +# Contributor (Arch): Aaron Griffin <aaron@archlinux.org> +# Contributor (Arch): judd <jvinet@zeroflux.org> +# Maintainer: André Silva <emulatorman@parabola.nu> +# Contributor: Márcio Silva <coadde@parabola.nu> + +_pkgname=openssh +pkgname=openssh-knock +pkgver=6.7p1 +pkgrel=1 +pkgdesc='Free version of the SSH connectivity tools, with support for stealth TCP sockets' +url='http://www.openssh.org/portable.html' +license=('custom:BSD') +arch=('i686' 'x86_64') +conflicts=(${_pkgname}) +provides=(${_pkgname}) +makedepends=('linux-headers') +depends=('krb5' 'openssl' 'libedit' 'ldns') +optdepends=('xorg-xauth: X11 forwarding' + 'x11-ssh-askpass: input passphrase in X') +source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${_pkgname}-${pkgver}.tar.gz"{,.asc} + "http://gnunet.org/sites/default/files/${_pkgname}-linux-knock-patch_0.diff" + 'sshdgenkeys.service' + 'sshd@.service' + 'sshd.service' + 'sshd.socket' + 'sshd.pam') +sha1sums=('14e5fbed710ade334d65925e080d1aaeb9c85bf6' 'SKIP' + 'f9ea1f6411548e5c29383664b5a57866bc2579f4' + 'cc1ceec606c98c7407e7ac21ade23aed81e31405' + '6a0ff3305692cf83aca96e10f3bb51e1c26fccda' + 'ec49c6beba923e201505f5669cea48cad29014db' + 'e12fa910b26a5634e5a6ac39ce1399a132cf6796' + 'd93dca5ebda4610ff7647187f8928a3de28703f3') + +backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd') + +install=install + +prepare() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + patch -Np1 -i "${srcdir}"/${_pkgname}-linux-knock-patch_0.diff +} + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + export CFLAGS="$CFLAGS -DTCP_STEALTH=25" + + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib/ssh \ + --sysconfdir=/etc/ssh \ + --with-ldns \ + --with-libedit \ + --with-ssl-engine \ + --with-pam \ + --with-privsep-user=nobody \ + --with-kerberos5=/usr \ + --with-xauth=/usr/bin/xauth \ + --with-mantype=man \ + --with-md5-passwords \ + --with-pid-dir=/run \ + + make +} + +check() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + make tests || true + # hard to suitably test connectivity: + # - fails with /bin/false as login shell + # - fails with firewall activated, etc. +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install + + ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz + install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENCE" + + install -Dm644 ../sshdgenkeys.service "${pkgdir}"/usr/lib/systemd/system/sshdgenkeys.service + install -Dm644 ../sshd@.service "${pkgdir}"/usr/lib/systemd/system/sshd@.service + install -Dm644 ../sshd.service "${pkgdir}"/usr/lib/systemd/system/sshd.service + install -Dm644 ../sshd.socket "${pkgdir}"/usr/lib/systemd/system/sshd.socket + install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd + + install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh + install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id + install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1 + + sed \ + -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \ + -e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \ + -e '/^#UsePAM no$/c UsePAM yes' \ + -i "${pkgdir}"/etc/ssh/sshd_config +} diff --git a/pcr/openssh-knock/install b/pcr/openssh-knock/install new file mode 100644 index 000000000..6f0cd3703 --- /dev/null +++ b/pcr/openssh-knock/install @@ -0,0 +1,10 @@ +post_upgrade() { + if [[ $(vercmp $2 6.2p2) = -1 ]]; then + cat <<EOF + +==> The sshd daemon has been moved to /usr/bin alongside all binaries. +==> Please update this path in your scripts if applicable. + +EOF + fi +} diff --git a/pcr/openssh-knock/sshd.pam b/pcr/openssh-knock/sshd.pam new file mode 100644 index 000000000..7ecef084d --- /dev/null +++ b/pcr/openssh-knock/sshd.pam @@ -0,0 +1,6 @@ +#%PAM-1.0 +#auth required pam_securetty.so #disable remote root +auth include system-remote-login +account include system-remote-login +password include system-remote-login +session include system-remote-login diff --git a/pcr/openssh-knock/sshd.service b/pcr/openssh-knock/sshd.service new file mode 100644 index 000000000..55ed95322 --- /dev/null +++ b/pcr/openssh-knock/sshd.service @@ -0,0 +1,17 @@ +[Unit] +Description=OpenSSH Daemon +Wants=sshdgenkeys.service +After=sshdgenkeys.service +After=network.target + +[Service] +ExecStart=/usr/bin/sshd -D +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=always + +[Install] +WantedBy=multi-user.target + +# This service file runs an SSH daemon that forks for each incoming connection. +# If you prefer to spawn on-demand daemons, use sshd.socket and sshd@.service. diff --git a/pcr/openssh-knock/sshd.socket b/pcr/openssh-knock/sshd.socket new file mode 100644 index 000000000..e09e32869 --- /dev/null +++ b/pcr/openssh-knock/sshd.socket @@ -0,0 +1,10 @@ +[Unit] +Conflicts=sshd.service +Wants=sshdgenkeys.service + +[Socket] +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/pcr/openssh-knock/sshd@.service b/pcr/openssh-knock/sshd@.service new file mode 100644 index 000000000..7ce3d37ba --- /dev/null +++ b/pcr/openssh-knock/sshd@.service @@ -0,0 +1,8 @@ +[Unit] +Description=OpenSSH Per-Connection Daemon +After=sshdgenkeys.service + +[Service] +ExecStart=-/usr/bin/sshd -i +StandardInput=socket +StandardError=syslog diff --git a/pcr/openssh-knock/sshdgenkeys.service b/pcr/openssh-knock/sshdgenkeys.service new file mode 100644 index 000000000..1d01b7acf --- /dev/null +++ b/pcr/openssh-knock/sshdgenkeys.service @@ -0,0 +1,17 @@ +[Unit] +Description=SSH Key Generation +ConditionPathExists=|!/etc/ssh/ssh_host_key +ConditionPathExists=|!/etc/ssh/ssh_host_key.pub +ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key.pub +ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key.pub +ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key.pub +ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key +ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key.pub + +[Service] +ExecStart=/usr/bin/ssh-keygen -A +Type=oneshot +RemainAfterExit=yes diff --git a/pcr/python-pygame-hg b/pcr/python-pygame-hg deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/python-pygame-hg +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/renpy b/pcr/renpy deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/renpy +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/renpy/PKGBUILD b/pcr/renpy/PKGBUILD new file mode 100644 index 000000000..4cfbbb1fa --- /dev/null +++ b/pcr/renpy/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer (Arch): AlexanderR <rvacheva at nxt dot ru> +# Contributor (Arch): zhn <zhangn1985 AT gmail com> +# Maintainer: Márcio Silva <coadde@parabola.nu> + +pkgbase=renpy +pkgname=($pkgbase python2-$pkgbase) +pkgver=6.18.3 +pkgrel=1 +pkgdesc="Ren'Py is a visual novel engine that helps you use words, images, and sounds to tell stories with the computer. This package contains both player and development tools" +arch=('i686' 'x86_64' 'mips64el') +license=MIT +url="http://www.$pkgbase.org/" +depends=('ttf-dejavu') +makedepends=('cython' 'ffmpeg' 'freetype2>=2.5.1' 'fribidi' 'glew' 'python2>=2.7' 'python2-pygame>=1.9.1') +conflicts=("${pkgbase}64" "$pkgbase-bin") +replaces=("${pkgbase}64") +source=("http://www.$pkgbase.org/dl/$pkgver/$pkgbase-$pkgver-source.tar.bz2" + "$pkgbase.desktop" "$pkgbase."{sh,csh} "$pkgbase-launcher.sh") +sha512sums=('7ea99adaf1fbea7a499790fb5b37349fc797f383fb633956a43955c80885b259e26570469c430f4c4c103e62444f60082690489ee6400809f5e9024693261e55' + '1af85c7a0c10662bfa4c03611fed695325f5953ac0f2c913f5342b1dca22b22115f07e69d646d92a3b95f5b896283e9b1bc7fe3e0a338536b5d9d48beedae8d5' + '2a9302adbc6ff45e048d42487ac86e7501f90b2d393933af5d39d663a0b3707f795a04f65598e356a64809dfa0175a4ad860b355e5337ee149692c21caf339df' + 'bcb3152a88d5f913a99855e9d6fa5d0019e310ba9d55a6288d2d8b60cb6c9ab3ddf8c772dfd23a2851d52479adc2a16bd3ffe25ff7fb50d222ec1f55eaa48b09' + '727f9f16e1cff76c279d6e1578572a92c7b21ec34c6cb2841a04ac7b5cf6d2836487293744a9541993ee2e3a8dae927feb4e78f1afd01a748f5489090453cdd7') + +export CPPFLAGS="$CPPFLAGS $(pkg-config freetype2 --cflags) $(pkg-config glib-2.0 --cflags)" + +prepare() { + cd $srcdir/$pkgbase-$pkgver-source + + sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' $pkgbase.py module/setup.py + + msg 'fonts are provided by ttf-dejavu' + cd $pkgname + rm -v common/DejaVuSans.ttf common/DejaVuSans.txt +} + +build() { + cd $srcdir/$pkgbase-$pkgver-source + python2 module/setup.py build +} + +package_renpy() { + depends+=("python2-$pkgbase=$pkgver") + arch=('any') + install=$pkgbase.install + + cd $pkgbase-$pkgver-source + + install -vd $pkgdir/{usr/share/{$pkgbase,doc/$pkgbase},etc/profile.d} + install -vm755 $srcdir/$pkgbase.{sh,csh} $pkgdir/etc/profile.d + install -vDm755 $srcdir/$pkgbase-launcher.sh $pkgdir/usr/bin/$pkgbase + install -vDm644 $srcdir/$pkgbase.desktop $pkgdir/usr/share/applications/$pkgbase.desktop + + cp -va launcher $pkgbase{,.py} templates the_question tutorial $pkgdir/usr/share/$pkgbase + ln -vs $pkgbase/common $pkgdir/usr/share/$pkgbase/common + cp -va doc/* $pkgdir/usr/share/doc/$pkgbase + + install -vDm644 launcher/game/images/logo.png $pkgdir/usr/share/pixmaps/$pkgbase.png + install -vDm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgbase/LICENSE + + chgrp -vR games $pkgdir/usr/share/$pkgbase/{the_question,tutorial} + chmod -vR g+w $pkgdir/usr/share/$pkgbase/{the_question,tutorial} +} + +package_python2-renpy() { + pkgdesc="Platform-dependant Ren'Py libraries" + depends=('ffmpeg' 'freetype2>=2.5.1' 'fribidi' 'glew' 'python2-pygame>=1.9.1') + provides=("python-$pkgbase=$pkgver") + conflicts=("python-$pkgbase") + replaces=("python-$pkgbase") + + cd $pkgbase-$pkgver-source + + msg "install $pkgname" + python2 module/setup.py install --root=$pkgdir/ --prefix=/usr --optimize=1 + install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE +} diff --git a/pcr/renpy/renpy-launcher.sh b/pcr/renpy/renpy-launcher.sh new file mode 100644 index 000000000..605c0c1fd --- /dev/null +++ b/pcr/renpy/renpy-launcher.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +mkdir -p ~/renpy_projects +cd ~/renpy_projects +exec env python2 -OO /usr/share/renpy/renpy.py "$@" diff --git a/pcr/renpy/renpy.csh b/pcr/renpy/renpy.csh new file mode 100644 index 000000000..71269b48c --- /dev/null +++ b/pcr/renpy/renpy.csh @@ -0,0 +1 @@ +setenv RENPY_BASE /usr/share/renpy/ diff --git a/pcr/renpy/renpy.desktop b/pcr/renpy/renpy.desktop new file mode 100644 index 000000000..5cd64ea94 --- /dev/null +++ b/pcr/renpy/renpy.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Ren'Py +GenericName= renpy +GenericName[fr]= renpy +Comment=A programming language and runtime, intended to ease the creation of visual-novel type games. +Comment[fr]=Un langage de programmation et un exécutable conçus pour faciliter la création de jeux de type "visual-novel" +Icon=renpy.png +Exec=renpy +Categories=Game;AdventureGame; + diff --git a/pcr/renpy/renpy.install b/pcr/renpy/renpy.install new file mode 100644 index 000000000..bfe161cdb --- /dev/null +++ b/pcr/renpy/renpy.install @@ -0,0 +1,21 @@ +post_install() { + ln -vsf /usr/share/doc/renpy /usr/share/renpy/doc + + cat << EOF +This package sets global environment variable RENPY_BASE, forcing all RenPy +games, including incompatible ones, to use system-wide interpreter. Undefine +this variable to launch games, you downloaded somewhere, with their built-in +versions of interpreter. + +To run two example games: The Question and RenPy Tutorial you should be +member of "games" group. +EOF +} + +post_upgrade() { + post_install +} + +pre_remove() { + rm -v /usr/share/renpy/doc +} diff --git a/pcr/renpy/renpy.sh b/pcr/renpy/renpy.sh new file mode 100644 index 000000000..32b2e6d29 --- /dev/null +++ b/pcr/renpy/renpy.sh @@ -0,0 +1 @@ +export RENPY_BASE=/usr/share/renpy/ diff --git a/pcr/supermodel b/pcr/supermodel deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/supermodel +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/supermodel/PKGBUILD b/pcr/supermodel/PKGBUILD new file mode 100644 index 000000000..7621f5e90 --- /dev/null +++ b/pcr/supermodel/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer (Arch): Anton Shestakov <engored*ya.ru> + +pkgname=supermodel +pkgver=0.2a +pkgrel=1 +pkgdesc='A Sega Model 3 Arcade Emulator' +arch=('i686' 'x86_64' 'mips64el') +url='http://www.supermodel3.com/' +license=('GPL3') +depends=('mesa' 'glu' 'sdl' 'zlib') +install=supermodel.install +source=('multiuser.patch' 'supermodel.sh' + "http://www.supermodel3.com/Files/Supermodel_${pkgver}_Src.zip") +md5sums=('a7cf136e412a0d927b099c15793b658d' 'ea8274c2a37acddd026fce9c831530cc' + 'd22359fbe277fe8f6fe0a06524350fc1') + +MAKEFLAGS="-j1" + +build() { + cd "$srcdir/Supermodel_${pkgver}_Src" + sed -e "s/-Wall -O3/$CFLAGS/" -i 'Makefiles/Makefile.SDL.UNIX.GCC' + patch -p1 < ../multiuser.patch + make -f 'Makefiles/Makefile.SDL.UNIX.GCC' +} + +package() { + cd "$srcdir/Supermodel_${pkgver}_Src" + + install -Dm755 "$srcdir/supermodel.sh" "$pkgdir/usr/bin/supermodel" + + install -Dm755 "bin/Supermodel" "$pkgdir/usr/share/supermodel/Supermodel" + + install -Dm644 "Docs/LICENSE.txt" "$pkgdir/usr/share/licenses/supermodel/LICENSE" + install -Dm644 "Docs/README.txt" "$pkgdir/usr/share/doc/supermodel/README" + + install -d "$pkgdir/usr/share/supermodel/Config" + install -m644 Config/* "$pkgdir/usr/share/supermodel/Config/" +} diff --git a/pcr/supermodel/multiuser.patch b/pcr/supermodel/multiuser.patch new file mode 100644 index 000000000..9cb93e02c --- /dev/null +++ b/pcr/supermodel/multiuser.patch @@ -0,0 +1,107 @@ +diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp +--- a/Src/OSD/SDL/Main.cpp ++++ b/Src/OSD/SDL/Main.cpp +@@ -307,7 +307,6 @@ + Configuration file management and input settings.
+ ******************************************************************************/
+
+-#define CONFIG_FILE_PATH "Config/Supermodel.ini"
+ #define CONFIG_FILE_COMMENT ";\n" \
+ "; Supermodel Configuration File\n" \
+ ";\n"
+@@ -315,9 +314,13 @@ + // Create and configure inputs
+ static bool ConfigureInputs(CInputs *Inputs, bool configure)
+ {
++ char configFilePath[512];
++
++ sprintf(configFilePath, "%s/.supermodel/supermodel.ini", getenv("HOME"));
++
+ // Open and parse configuration file
+ CINIFile INI;
+- INI.Open(CONFIG_FILE_PATH); // doesn't matter if it exists or not, will get overwritten
++ INI.Open(configFilePath); // doesn't matter if it exists or not, will get overwritten
+ INI.SetDefaultSectionName("Global");
+ INI.Parse();
+
+@@ -338,9 +341,9 @@ + Inputs->WriteToINIFile(&INI, "Global");
+
+ if (OKAY != INI.Write(CONFIG_FILE_COMMENT))
+- ErrorLog("Unable to save configuration to '%s'.", CONFIG_FILE_PATH);
++ ErrorLog("Unable to save configuration to '%s'.", configFilePath);
+ else
+- printf("Configuration successfully saved to '%s'.\n", CONFIG_FILE_PATH);
++ printf("Configuration successfully saved to '%s'.\n", configFilePath);
+ }
+ else
+ puts("Configuration aborted...");
+@@ -412,9 +415,13 @@ + // Read settings (from a specific section) from the config file
+ static void ReadConfigFile(const char *section)
+ {
++ char configFilePath[512];
++
++ sprintf(configFilePath, "%s/.supermodel/supermodel.ini", getenv("HOME"));
++
+ CINIFile INI;
+
+- INI.Open(CONFIG_FILE_PATH);
++ INI.Open(configFilePath);
+ INI.SetDefaultSectionName("Global"); // required to read settings not associated with a specific section
+ INI.Parse();
+ ApplySettings(&INI, section);
+@@ -498,10 +505,10 @@ + static void SaveState(CModel3 *Model3)
+ {
+ CBlockFile SaveState;
+- char filePath[24];
++ char filePath[512];
+ int fileVersion = STATE_FILE_VERSION;
+
+- sprintf(filePath, "Saves/%s.st%d", Model3->GetGameInfo()->id, saveSlot);
++ sprintf(filePath, "%s/.supermodel/saves/%s.st%d", getenv("HOME"), Model3->GetGameInfo()->id, saveSlot);
+ if (OKAY != SaveState.Create(filePath, "Supermodel Save State", "Supermodel Version " SUPERMODEL_VERSION))
+ {
+ ErrorLog("Unable to save state to '%s'.", filePath);
+@@ -522,11 +529,11 @@ + static void LoadState(CModel3 *Model3)
+ {
+ CBlockFile SaveState;
+- char filePath[24];
++ char filePath[512];
+ int fileVersion;
+
+ // Generate file path
+- sprintf(filePath, "Saves/%s.st%d", Model3->GetGameInfo()->id, saveSlot);
++ sprintf(filePath, "%s/.supermodel/saves/%s.st%d", getenv("HOME"), Model3->GetGameInfo()->id, saveSlot);
+
+ // Open and check to make sure format is correct
+ if (OKAY != SaveState.Load(filePath))
+@@ -558,10 +565,10 @@ + static void SaveNVRAM(CModel3 *Model3)
+ {
+ CBlockFile NVRAM;
+- char filePath[24];
++ char filePath[512];
+ int fileVersion = NVRAM_FILE_VERSION;
+
+- sprintf(filePath, "NVRAM/%s.nv", Model3->GetGameInfo()->id);
++ sprintf(filePath, "%s/.supermodel/NVRAM/%s.nv", getenv("HOME"), Model3->GetGameInfo()->id);
+ if (OKAY != NVRAM.Create(filePath, "Supermodel NVRAM State", "Supermodel Version " SUPERMODEL_VERSION))
+ {
+ ErrorLog("Unable to save NVRAM to '%s'. Make sure directory exists!", filePath);
+@@ -581,11 +588,11 @@ + static void LoadNVRAM(CModel3 *Model3)
+ {
+ CBlockFile NVRAM;
+- char filePath[24];
++ char filePath[512];
+ int fileVersion;
+
+ // Generate file path
+- sprintf(filePath, "NVRAM/%s.nv", Model3->GetGameInfo()->id);
++ sprintf(filePath, "%s/.supermodel/NVRAM/%s.nv", getenv("HOME"), Model3->GetGameInfo()->id);
+
+ // Open and check to make sure format is correct
+ if (OKAY != NVRAM.Load(filePath))
diff --git a/pcr/supermodel/supermodel.install b/pcr/supermodel/supermodel.install new file mode 100644 index 000000000..94ef82c48 --- /dev/null +++ b/pcr/supermodel/supermodel.install @@ -0,0 +1,12 @@ +# Message displayed for a fresh install. +post_install() { + echo "" + echo "***************************************************************" + echo " Supermodel has been installed in /usr/share/supermodel." + echo " However, Supermodel can be run by typing supermodel and it's options:" + echo " supermodel <romset> [options]" + echo "" + echo " Note: You need to provide the full path to the romset." + echo "***************************************************************" + echo "" +} diff --git a/pcr/supermodel/supermodel.sh b/pcr/supermodel/supermodel.sh new file mode 100644 index 000000000..992dd406d --- /dev/null +++ b/pcr/supermodel/supermodel.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +mkdir -p ~/.supermodel/NVRAM +mkdir -p ~/.supermodel/saves + +cd /usr/share/supermodel + +if [[ ! -f ~/.supermodel/supermodel.ini ]]; then + cp ./Config/Supermodel.ini ~/.supermodel/supermodel.ini +fi + +./Supermodel "$@" diff --git a/pcr/systemd-knock b/pcr/systemd-knock deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/systemd-knock +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/systemd-knock/0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch b/pcr/systemd-knock/0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch new file mode 100644 index 000000000..86817596b --- /dev/null +++ b/pcr/systemd-knock/0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch @@ -0,0 +1,33 @@ +From 1ab19cb167b32967556eefd8f6d3df0e3de7d67d Mon Sep 17 00:00:00 2001 +From: Dave Reisner <dreisner@archlinux.org> +Date: Wed, 29 Oct 2014 13:32:43 -0400 +Subject: [PATCH] nspawn: ignore EEXIST when creating mount point + +A combination of commits f3c80515c and 79d80fc14 cause nspawn to +silently fail with a commandline such as: + + # systemd-nspawn -D /build/extra-x86_64 --bind=/usr + +strace shows the culprit: + + [pid 27868] writev(2, [{"Failed to create mount point /build/extra-x86_64/usr: File exists", 82}, {"\n", 1}], 2) = 83 +--- + src/nspawn/nspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index b6d9bc6..d88987a 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -758,7 +758,7 @@ static int mount_binds(const char *dest, char **l, bool ro) { + * and char devices. */ + if (S_ISDIR(source_st.st_mode)) { + r = mkdir_label(where, 0755); +- if (r < 0) { ++ if (r < 0 && errno != EEXIST) { + log_error("Failed to create mount point %s: %s", where, strerror(-r)); + + return r; +-- +2.1.2 + diff --git a/pcr/systemd-knock/0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch b/pcr/systemd-knock/0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch new file mode 100644 index 000000000..fc8f16a79 --- /dev/null +++ b/pcr/systemd-knock/0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch @@ -0,0 +1,25 @@ +From ef7b6c0190fefaacf6d8f8e1a6dda4ba8b98091b Mon Sep 17 00:00:00 2001 +From: Lennart Poettering <lennart@poettering.net> +Date: Wed, 29 Oct 2014 17:58:43 +0100 +Subject: [PATCH] sd-bus: properly handle removals of non-existing matches + +--- + src/libsystemd/sd-bus/bus-match.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c +index 18afe0f..5658c61 100644 +--- a/src/libsystemd/sd-bus/bus-match.c ++++ b/src/libsystemd/sd-bus/bus-match.c +@@ -537,7 +537,7 @@ static int bus_match_find_compare_value( + else if (BUS_MATCH_CAN_HASH(t)) + n = hashmap_get(c->compare.children, value_str); + else { +- for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next) ++ for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next) + ; + } + +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch b/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch new file mode 100644 index 000000000..3d72b5df2 --- /dev/null +++ b/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch @@ -0,0 +1,31 @@ +From d5a248dbe933c5cbe3ba3d0c5eb8a035018ba6af Mon Sep 17 00:00:00 2001 +From: Dan Williams <dcbw@redhat.com> +Date: Thu, 30 Oct 2014 14:23:00 -0500 +Subject: [PATCH] sd-dhcp-client: clean up raw socket sd_event_source when + creating new UDP socket + +The raw socket sd_event_source used for DHCP server solicitations +was simply dropped on the floor when creating the new UDP socket +after a lease has been acquired. Clean it up properly so we're +not still listening and responding to events on it. +--- + src/libsystemd-network/sd-dhcp-client.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c +index 0eba4c3..1f7f238 100644 +--- a/src/libsystemd-network/sd-dhcp-client.c ++++ b/src/libsystemd-network/sd-dhcp-client.c +@@ -1269,6 +1269,9 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message, + if (r >= 0) { + client->timeout_resend = + sd_event_source_unref(client->timeout_resend); ++ client->receive_message = ++ sd_event_source_unref(client->receive_message); ++ client->fd = asynchronous_close(client->fd); + + if (IN_SET(client->state, DHCP_STATE_REQUESTING, + DHCP_STATE_REBOOTING)) +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-shared-install-avoid-prematurely-rejecting-missing-u.patch b/pcr/systemd-knock/0001-shared-install-avoid-prematurely-rejecting-missing-u.patch new file mode 100644 index 000000000..6ea9c7cca --- /dev/null +++ b/pcr/systemd-knock/0001-shared-install-avoid-prematurely-rejecting-missing-u.patch @@ -0,0 +1,39 @@ +From 0ffce503cd6e5a5ff5ba5cd1cc23684cfb8bb9e3 Mon Sep 17 00:00:00 2001 +From: Dave Reisner <dreisner@archlinux.org> +Date: Thu, 30 Oct 2014 20:12:05 -0400 +Subject: [PATCH] shared/install: avoid prematurely rejecting "missing" units + +f7101b7368df copied some logic to prevent enabling masked units, but +also added a check which causes attempts to enable templated units to +fail. Since we know the logic beyond this check will properly handle +units which truly do not exist, we can rely on the unit file state +comparison to suffice for expressing the intent of f7101b7368df. + +ref: https://bugs.archlinux.org/task/42616 +--- + src/shared/install.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/shared/install.c b/src/shared/install.c +index 035b44c..cab93e8 100644 +--- a/src/shared/install.c ++++ b/src/shared/install.c +@@ -1620,12 +1620,10 @@ int unit_file_enable( + STRV_FOREACH(i, files) { + UnitFileState state; + ++ /* We only want to know if this unit is masked, so we ignore ++ * errors from unit_file_get_state, deferring other checks. ++ * This allows templated units to be enabled on the fly. */ + state = unit_file_get_state(scope, root_dir, *i); +- if (state < 0) { +- log_error("Failed to get unit file state for %s: %s", *i, strerror(-state)); +- return state; +- } +- + if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) { + log_error("Failed to enable unit: Unit %s is masked", *i); + return -ENOTSUP; +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-shutdown-fix-arguments-to-run-initramfs-shutdown.patch b/pcr/systemd-knock/0001-shutdown-fix-arguments-to-run-initramfs-shutdown.patch new file mode 100644 index 000000000..5d48d17bc --- /dev/null +++ b/pcr/systemd-knock/0001-shutdown-fix-arguments-to-run-initramfs-shutdown.patch @@ -0,0 +1,68 @@ +From 4b5d8d0f22ae61ceb45a25391354ba53b43ee992 Mon Sep 17 00:00:00 2001 +From: Michal Schmidt <mschmidt@redhat.com> +Date: Thu, 6 Nov 2014 22:24:13 +0100 +Subject: [PATCH] shutdown: fix arguments to /run/initramfs/shutdown + +Our initrd interface specifies that the verb is in argv[1]. +This is where systemd passes it to systemd-shutdown, but getopt +permutes argv[]. This confuses dracut's shutdown script: + Shutdown called with argument '--log-level'. Rebooting! + +getopt can be convinced to not permute argv[] by having '-' as the first +character of optstring. Let's use it. This requires changing the way +non-option arguments (in our case, the verb) are processed. + +This fixes a bug where the system would reboot instead of powering off. +--- + src/core/shutdown.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/core/shutdown.c b/src/core/shutdown.c +index dd11ae3..48ed7fa 100644 +--- a/src/core/shutdown.c ++++ b/src/core/shutdown.c +@@ -75,7 +75,9 @@ static int parse_argv(int argc, char *argv[]) { + assert(argc >= 1); + assert(argv); + +- while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0) ++ /* "-" prevents getopt from permuting argv[] and moving the verb away ++ * from argv[1]. Our interface to initrd promises it'll be there. */ ++ while ((c = getopt_long(argc, argv, "-", options, NULL)) >= 0) + switch (c) { + + case ARG_LOG_LEVEL: +@@ -113,6 +115,13 @@ static int parse_argv(int argc, char *argv[]) { + + break; + ++ case '\001': ++ if (!arg_verb) ++ arg_verb = optarg; ++ else ++ log_error("Excess arguments, ignoring"); ++ break; ++ + case '?': + return -EINVAL; + +@@ -120,15 +129,11 @@ static int parse_argv(int argc, char *argv[]) { + assert_not_reached("Unhandled option code."); + } + +- if (optind >= argc) { ++ if (!arg_verb) { + log_error("Verb argument missing."); + return -EINVAL; + } + +- arg_verb = argv[optind]; +- +- if (optind + 1 < argc) +- log_error("Excess arguments, ignoring"); + return 0; + } + +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-udev-hwdb-Change-error-message-regarding-missing-hwd.patch b/pcr/systemd-knock/0001-udev-hwdb-Change-error-message-regarding-missing-hwd.patch new file mode 100644 index 000000000..1a2ac1edf --- /dev/null +++ b/pcr/systemd-knock/0001-udev-hwdb-Change-error-message-regarding-missing-hwd.patch @@ -0,0 +1,32 @@ +From 8232e39e7cf32071e11b3b04839e6c98fbc81d0f Mon Sep 17 00:00:00 2001 +From: Colin Guthrie <colin@mageia.org> +Date: Wed, 5 Nov 2014 15:29:41 +0000 +Subject: [PATCH] udev hwdb: Change error message regarding missing hwdb.bin + back to debug. + +When used in an initramfs, it's expected that the hwdb.bin file is +not present (it makes for a very large initramfs otherwise). + +While it's nice to tell the user about this, as it's not strictly +speaking an error we really shouldn't be so forceful in our +reporting. +--- + src/libudev/libudev-hwdb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c +index a1cfc0b..0716072 100644 +--- a/src/libudev/libudev-hwdb.c ++++ b/src/libudev/libudev-hwdb.c +@@ -296,7 +296,7 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) { + } + + if (!hwdb->f) { +- udev_err(udev, "hwdb.bin does not exist, please run udevadm hwdb --update"); ++ udev_dbg(udev, "hwdb.bin does not exist, please run udevadm hwdb --update"); + udev_hwdb_unref(hwdb); + return NULL; + } +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch b/pcr/systemd-knock/0001-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch new file mode 100644 index 000000000..0be955ec7 --- /dev/null +++ b/pcr/systemd-knock/0001-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch @@ -0,0 +1,31 @@ +From 919699ec301ea507edce4a619141ed22e789ac0d Mon Sep 17 00:00:00 2001 +From: Lennart Poettering <lennart@poettering.net> +Date: Fri, 31 Oct 2014 16:22:36 +0100 +Subject: [PATCH] units: don't order journal flushing afte remote-fs.target + +Instead, only depend on the actual file systems we need. + +This should solve dep loops on setups where remote-fs.target is moved +into late boot. +--- + units/systemd-journal-flush.service.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in +index 699670b..2612220 100644 +--- a/units/systemd-journal-flush.service.in ++++ b/units/systemd-journal-flush.service.in +@@ -10,8 +10,9 @@ Description=Trigger Flushing of Journal to Persistent Storage + Documentation=man:systemd-journald.service(8) man:journald.conf(5) + DefaultDependencies=no + Requires=systemd-journald.service +-After=systemd-journald.service local-fs.target remote-fs.target ++After=systemd-journald.service + Before=systemd-user-sessions.service systemd-tmpfiles-setup.service ++RequiresMountsFor=/var/log/journal + + [Service] + ExecStart=@rootbindir@/journalctl --flush +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-units-make-systemd-journald.service-Type-notify.patch b/pcr/systemd-knock/0001-units-make-systemd-journald.service-Type-notify.patch new file mode 100644 index 000000000..820b23fbf --- /dev/null +++ b/pcr/systemd-knock/0001-units-make-systemd-journald.service-Type-notify.patch @@ -0,0 +1,35 @@ +From a87a38c20196a4aeb56b6ba71d688eefd0b21c30 Mon Sep 17 00:00:00 2001 +From: Michal Schmidt <mschmidt@redhat.com> +Date: Tue, 4 Nov 2014 20:28:08 +0100 +Subject: [PATCH] units: make systemd-journald.service Type=notify + +It already calls sd_notify(), so it looks like an oversight. + +Without it, its ordering to systemd-journal-flush.service is +non-deterministic and the SIGUSR1 from flushing may kill journald before +it has its signal handlers set up. + +https://bugs.freedesktop.org/show_bug.cgi?id=85871 +https://bugzilla.redhat.com/show_bug.cgi?id=1159641 +--- +(foutrelis: dropped systemd-journald-audit.socket from Sockets= in order to + apply to systemd 217) + + units/systemd-journald.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in +index 7ee67fd..8d380c8 100644 +--- a/units/systemd-journald.service.in ++++ b/units/systemd-journald.service.in +@@ -14,6 +14,7 @@ After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-a + Before=sysinit.target + + [Service] ++Type=notify + Sockets=systemd-journald.socket systemd-journald-dev-log.socket + ExecStart=@rootlibexecdir@/systemd-journald + Restart=always +-- +2.1.3 + diff --git a/pcr/systemd-knock/0001-units-order-sd-journal-flush-after-sd-remount-fs.patch b/pcr/systemd-knock/0001-units-order-sd-journal-flush-after-sd-remount-fs.patch new file mode 100644 index 000000000..b288b5765 --- /dev/null +++ b/pcr/systemd-knock/0001-units-order-sd-journal-flush-after-sd-remount-fs.patch @@ -0,0 +1,29 @@ +From 1f1926aa5e836caa3bd6df43704aecd606135103 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Sun, 2 Nov 2014 21:45:42 -0500 +Subject: [PATCH] units: order sd-journal-flush after sd-remount-fs + +Otherwise we could attempt to flush the journal while /var/log/ was +still ro, and silently skip journal flushing. + +The way that errors in flushing are handled should still be changed to +be more transparent and robust. +--- + units/systemd-journal-flush.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in +index fa29089..98c91b4 100644 +--- a/units/systemd-journal-flush.service.in ++++ b/units/systemd-journal-flush.service.in +@@ -11,6 +11,7 @@ Documentation=man:systemd-journald.service(8) man:journald.conf(5) + DefaultDependencies=no + Requires=systemd-journald.service + After=systemd-journald.service ++After=systemd-remount-fs.service + Before=systemd-user-sessions.service systemd-tmpfiles-setup.service + RequiresMountsFor=/var/log/journal + +-- +2.1.3 + diff --git a/pcr/systemd-knock/PKGBUILD b/pcr/systemd-knock/PKGBUILD new file mode 100644 index 000000000..932fe14cd --- /dev/null +++ b/pcr/systemd-knock/PKGBUILD @@ -0,0 +1,188 @@ +# Maintainer (Arch): Dave Reisner <dreisner@archlinux.org> +# Maintainer (Arch): Tom Gundersen <teg@jklm.no> +# Maintainer: Márcio Silva <coadde@parabola.nu> + +_pkgbase=systemd +pkgbase=systemd-knock +pkgname=('systemd-knock' 'libsystemd-knock') +pkgver=217 +pkgrel=8 +arch=('i686' 'x86_64') +url="http://www.freedesktop.org/wiki/Software/systemd" +makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gobject-introspection' 'gperf' + 'gtk-doc' 'intltool' 'kmod' 'libcap' 'libidn' 'libgcrypt' 'libmicrohttpd' + 'libxslt' 'util-linux' 'linux-api-headers' 'lz4' 'pam' 'python' + 'python-lxml' 'quota-tools' 'shadow' 'xz') +options=('strip' 'debug') +source=("http://www.freedesktop.org/software/$_pkgbase/$_pkgbase-$pkgver.tar.xz" + '0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch' + '0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch' + '0001-shared-install-avoid-prematurely-rejecting-missing-u.patch' + '0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch' + '0001-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch' + '0001-units-order-sd-journal-flush-after-sd-remount-fs.patch' + '0001-units-make-systemd-journald.service-Type-notify.patch' + '0001-shutdown-fix-arguments-to-run-initramfs-shutdown.patch' + '0001-udev-hwdb-Change-error-message-regarding-missing-hwd.patch' + '0001-adds-TCP-Stealth-support-to-systemd.patch::https://gnunet.org/sites/default/files/systemd-knock-patch.diff' + 'initcpio-hook-udev' + 'initcpio-install-systemd' + 'initcpio-install-udev') +md5sums=('e68dbff3cc19f66e341572d9fb2ffa89' + 'ca9e33118fd8d456563854d95512a577' + 'ade8c1b5b2c85d0a83b7bcf5aa6d131a' + '7aaf44ce842deb449fca0f2595bbc1e4' + '4adc3ddce027693bafa53089322e859b' + '42ff9d59bb057637355b202157d59991' + '92497d06e0af615be4b368fe615109c0' + 'a321d62d6ffada9e6976bdd339fa3219' + 'f72e8d086172177c224f0ce48ef54222' + '6326988822e9d18217525b2cb25cec1d' + '460945a02c8972bbc6616a5d8136a3ad' + '90ea67a7bb237502094914622a39e281' + '107c489f27c667be4101aecd3369b355' + 'bde43090d4ac0ef048e3eaee8202a407') + + +prepare() { + cd "$_pkgbase-$pkgver" + + patch -Np1 <../0001-nspawn-ignore-EEXIST-when-creating-mount-point.patch + patch -Np1 <../0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch + patch -Np1 <../0001-shared-install-avoid-prematurely-rejecting-missing-u.patch + patch -Np1 <../0001-sd-bus-properly-handle-removals-of-non-existing-matc.patch + patch -Np1 <../0001-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch + patch -Np1 <../0001-units-order-sd-journal-flush-after-sd-remount-fs.patch + patch -Np1 <../0001-units-make-systemd-journald.service-Type-notify.patch + patch -Np1 <../0001-shutdown-fix-arguments-to-run-initramfs-shutdown.patch + patch -Np1 <../0001-udev-hwdb-Change-error-message-regarding-missing-hwd.patch + patch -Np1 <../0001-adds-TCP-Stealth-support-to-systemd.patch +} + +build() { + cd "$_pkgbase-$pkgver" + + local timeservers=({0..3}.arch.pool.ntp.org) + + autoreconf --force --install -I config -I m4 + ./configure \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --enable-introspection \ + --enable-gtk-doc \ + --enable-lz4 \ + --enable-compat-libs \ + --enable-tcp-stealth \ + --disable-audit \ + --disable-ima \ + --disable-kdbus \ + --with-sysvinit-path= \ + --with-sysvrcnd-path= \ + --with-ntp-servers="${timeservers[*]}" + + make +} + +package_systemd-knock() { + pkgdesc="system and service manager with support for stealth TCP sockets" + license=('GPL2' 'LGPL2.1' 'MIT') + depends=('acl' 'bash' 'dbus' 'glib2' 'kbd' 'kmod' 'hwids' 'libcap' 'libgcrypt' + 'libsystemd-knock' 'libidn' 'lz4' 'pam' 'libseccomp' 'util-linux' 'xz') + provides=('nss-myhostname' "systemd-tools=$pkgver" "udev=$pkgver" "systemd=$pkgver") + replaces=('nss-myhostname' 'systemd-tools' 'udev') + conflicts=('nss-myhostname' 'systemd-tools' 'udev' 'systemd') + optdepends=('python: systemd library bindings' + 'cryptsetup: required for encrypted block devices' + 'libmicrohttpd: remote journald capabilities' + 'quota-tools: kernel-level quota management' + 'systemd-sysvcompat: symlink package to provide sysvinit binaries' + 'polkit: allow administration as unprivileged user') + backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf + etc/dbus-1/system.d/org.freedesktop.hostname1.conf + etc/dbus-1/system.d/org.freedesktop.login1.conf + etc/dbus-1/system.d/org.freedesktop.locale1.conf + etc/dbus-1/system.d/org.freedesktop.machine1.conf + etc/dbus-1/system.d/org.freedesktop.timedate1.conf + etc/pam.d/systemd-user + etc/systemd/bootchart.conf + etc/systemd/coredump.conf + etc/systemd/journald.conf + etc/systemd/logind.conf + etc/systemd/system.conf + etc/systemd/timesyncd.conf + etc/systemd/resolved.conf + etc/systemd/user.conf + etc/udev/udev.conf) + install="systemd.install" + + make -C "$_pkgbase-$pkgver" DESTDIR="$pkgdir" install + + # don't write units to /etc by default. some of these will be re-enabled on + # post_install. + rm "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1.service" \ + "$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-networkd.service" \ + "$pkgdir/etc/systemd/system/multi-user.target.wants/systemd-resolved.service" \ + "$pkgdir/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service" \ + "$pkgdir/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service" + rmdir "$pkgdir/etc/systemd/system/getty.target.wants" \ + "$pkgdir/etc/systemd/system/network-online.target.wants" + + # get rid of RPM macros + rm -r "$pkgdir/usr/lib/rpm" + + # add back tmpfiles.d/legacy.conf + install -m644 "systemd-$pkgver/tmpfiles.d/legacy.conf" "$pkgdir/usr/lib/tmpfiles.d" + + # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group + sed -i 's#GROUP="dialout"#GROUP="uucp"#g; + s#GROUP="tape"#GROUP="storage"#g; + s#GROUP="cdrom"#GROUP="optical"#g' "$pkgdir"/usr/lib/udev/rules.d/*.rules + sed -i 's/dialout/uucp/g; + s/tape/storage/g; + s/cdrom/optical/g' "$pkgdir"/usr/lib/sysusers.d/basic.conf + + # add mkinitcpio hooks + install -Dm644 "$srcdir/initcpio-install-systemd" "$pkgdir/usr/lib/initcpio/install/systemd" + install -Dm644 "$srcdir/initcpio-install-udev" "$pkgdir/usr/lib/initcpio/install/udev" + install -Dm644 "$srcdir/initcpio-hook-udev" "$pkgdir/usr/lib/initcpio/hooks/udev" + + # ensure proper permissions for /var/log/journal. This is only to placate + chown root:systemd-journal "$pkgdir/var/log/journal" + chmod 2755 "$pkgdir/var/log/journal"{,/remote} + + # fix pam file + sed 's|system-auth|system-login|g' -i "$pkgdir/etc/pam.d/systemd-user" + + # ship default policy to leave services disabled + echo 'disable *' >"$pkgdir"/usr/lib/systemd/system-preset/99-default.preset + + ### split out manpages for sysvcompat + rm -rf "$srcdir/_sysvcompat" + install -dm755 "$srcdir"/_sysvcompat/usr/share/man/man8/ + mv "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \ + "$srcdir"/_sysvcompat/usr/share/man/man8 + + ### split off runtime libraries + rm -rf "$srcdir/_libsystemd" + install -dm755 "$srcdir"/_libsystemd/usr/lib + cd "$srcdir"/_libsystemd + mv "$pkgdir"/usr/lib/lib{systemd,{g,}udev}*.so* usr/lib + + # include MIT license, since it's technically custom + install -Dm644 "$srcdir/$_pkgbase-$pkgver/LICENSE.MIT" \ + "$pkgdir/usr/share/licenses/systemd/LICENSE.MIT" +} + +package_libsystemd-knock() { + pkgdesc="systemd client libraries with support for stealth TCP sockets" + depends=('glib2' 'glibc' 'libgcrypt' 'lz4' 'xz') + license=('GPL2') + provides=('libgudev-1.0.so' 'libsystemd.so' 'libsystemd-daemon.so' 'libsystemd-id128.so' + 'libsystemd-journal.so' 'libsystemd-login.so' 'libudev.so' "libsystemd=$pkgver") + conflicts=('libsystemd') + + mv "$srcdir/_libsystemd"/* "$pkgdir" +} + +# vim: ft=sh syn=sh et diff --git a/pcr/systemd-knock/initcpio-hook-udev b/pcr/systemd-knock/initcpio-hook-udev new file mode 100644 index 000000000..ea9a11f8c --- /dev/null +++ b/pcr/systemd-knock/initcpio-hook-udev @@ -0,0 +1,22 @@ +#!/usr/bin/ash + +run_earlyhook() { + kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf + systemd-tmpfiles --prefix=/dev --create --boot + /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never + udevd_running=1 +} + +run_hook() { + msg ":: Triggering uevents..." + udevadm trigger --action=add --type=subsystems + udevadm trigger --action=add --type=devices + udevadm settle +} + +run_cleanuphook() { + udevadm control --exit + udevadm info --cleanup-db +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/pcr/systemd-knock/initcpio-install-systemd b/pcr/systemd-knock/initcpio-install-systemd new file mode 100644 index 000000000..1ebca01a8 --- /dev/null +++ b/pcr/systemd-knock/initcpio-install-systemd @@ -0,0 +1,168 @@ +#!/bin/bash + +strip_quotes() { + local len=${#1} quotes=$'[\'"]' str=${!1} + + if [[ ${str:0:1} = ${str: -1} && ${str:0:1} = $quotes ]]; then + printf -v "$1" %s "${str:1:-1}" + fi +} + +add_udev_rule() { + # Add an udev rules file to the initcpio image. Dependencies on binaries + # will be discovered and added. + # $1: path to rules file (or name of rules file) + + local rules= rule= key= value= binary= + + rules=$(PATH=/usr/lib/udev/rules.d:/lib/udev/rules.d type -P "$1") + if [[ -z $rules ]]; then + # complain about not found rules + return 1 + fi + + add_file "$rules" + + while IFS=, read -ra rule; do + # skip empty lines, comments + [[ -z $rule || $rule = @(+([[:space:]])|#*) ]] && continue + + for pair in "${rule[@]}"; do + IFS=' =' read -r key value <<< "$pair" + case $key in + RUN@({program}|+)|IMPORT{program}|ENV{REMOVE_CMD}) + strip_quotes 'value' + # just take the first word as the binary name + binary=${value%% *} + if [[ ${binary:0:1} != '/' ]]; then + binary=$(PATH=/usr/lib/udev:/lib/udev type -P "$binary") + fi + add_binary "$binary" + ;; + esac + done + done <"$rules" +} + +add_systemd_unit() { + # Add a systemd unit file to the initcpio image. Hard dependencies on binaries + # and other unit files will be discovered and added. + # $1: path to rules file (or name of rules file) + + local unit= rule= entry= key= value= binary= dep= + + unit=$(PATH=/usr/lib/systemd/system:/lib/systemd/system type -P "$1") + if [[ -z $unit ]]; then + # complain about not found unit file + return 1 + fi + + add_file "$unit" + + while IFS='=' read -r key values; do + read -ra values <<< "$values" + + case $key in + Requires|OnFailure) + # only add hard dependencies (not Wants) + map add_systemd_unit "${values[@]}" + ;; + Exec*) + # don't add binaries unless they are required + if [[ ${values[0]:0:1} != '-' ]]; then + add_binary "${values[0]}" + fi + ;; + esac + + done <"$unit" + + # preserve reverse soft dependency + for dep in {/usr,}/lib/systemd/system/*.wants/${unit##*/}; do + if [[ -L $dep ]]; then + add_symlink "$dep" + fi + done + + # add hard dependencies + if [[ -d $unit.requires ]]; then + for dep in "$unit".requires/*; do + add_systemd_unit ${dep##*/} + done + fi +} + +build() { + local rules unit + + # from base + add_binary /bin/mount + add_binary /usr/bin/kmod /usr/bin/modprobe + add_binary /usr/lib/systemd/systemd /init + + map add_binary \ + /usr/lib/systemd/systemd-hibernate-resume \ + /usr/lib/systemd/system-generators/systemd-hibernate-resume-generator \ + /usr/bin/systemd-tmpfiles + + # generators + map add_file \ + /usr/lib/systemd/system-generators/systemd-fstab-generator \ + /usr/lib/systemd/system-generators/systemd-gpt-auto-generator + + # udev rules and systemd units + map add_udev_rule "$rules" \ + 50-udev-default.rules \ + 60-persistent-storage.rules \ + 64-btrfs.rules \ + 80-drivers.rules \ + 99-systemd.rules + + map add_systemd_unit \ + initrd-cleanup.service \ + initrd-fs.target \ + initrd-parse-etc.service \ + initrd-root-fs.target \ + initrd-switch-root.service \ + initrd-switch-root.target \ + initrd-udevadm-cleanup-db.service \ + initrd.target \ + kmod-static-nodes.service \ + local-fs.target \ + local-fs-pre.target \ + paths.target \ + slices.target \ + sockets.target \ + swap.target \ + systemd-fsck@.service \ + systemd-hibernate-resume@.service \ + systemd-journald.service \ + systemd-journald-dev-log.socket \ + systemd-tmpfiles-setup-dev.service \ + systemd-udev-trigger.service \ + systemd-udevd-control.socket \ + systemd-udevd-kernel.socket \ + systemd-udevd.service \ + timers.target + + add_symlink "/usr/lib/systemd/system/default.target" "initrd.target" + add_symlink "/usr/lib/systemd/system/ctrl-alt-del.target" "reboot.target" + + # udev wants /etc/group since it doesn't launch with --resolve-names=never + add_file "/etc/nsswitch.conf" + add_binary "$(readlink -f /usr/lib/libnss_files.so)" + add_file "/etc/passwd" + add_file "/etc/group" +} + +help() { + cat <<HELPEOF +This will install a basic systemd setup in your initramfs, and is meant to +replace the 'base', 'usr', 'udev' and 'timestamp' hooks. Other hooks with runtime +components will need to be ported, and will not work as intended. You also may +wish to still include the 'base' hook (before this hook) to ensure that a +rescue shell exists on your initramfs. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/pcr/systemd-knock/initcpio-install-udev b/pcr/systemd-knock/initcpio-install-udev new file mode 100644 index 000000000..419c19e58 --- /dev/null +++ b/pcr/systemd-knock/initcpio-install-udev @@ -0,0 +1,29 @@ +#!/bin/bash + +build() { + local rules tool + + add_file "/etc/udev/udev.conf" + add_binary /usr/lib/systemd/systemd-udevd + add_binary /usr/bin/udevadm + add_binary /usr/bin/systemd-tmpfiles + + for rules in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do + add_file "/usr/lib/udev/rules.d/$rules" + done + for tool in ata_id scsi_id; do + add_file "/usr/lib/udev/$tool" + done + + add_runscript +} + +help() { + cat <<HELPEOF +This hook will use udev to create your root device node and detect the needed +modules for your root device. It is also required for firmware loading in +initramfs. It is recommended to use this hook. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/pcr/systemd-knock/systemd.install b/pcr/systemd-knock/systemd.install new file mode 100644 index 000000000..8957a3336 --- /dev/null +++ b/pcr/systemd-knock/systemd.install @@ -0,0 +1,191 @@ +#!/bin/bash + +sd_booted() { + [[ -d run/systemd/system && ! -L run/systemd/system ]] +} + +add_privs() { + if ! setcap "$2" "$1" 2>/dev/null; then + echo "==> Warning: setcap failed, falling back to setuid root on /$1" + chmod u+s "$1" + fi +} + +add_journal_acls() { + # ignore errors, since the filesystem might not support ACLs + setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null + : +} + +maybe_reexec() { + # don't reexec on 209-1 upgrade due to large infrastructural changes. + if [[ $(vercmp 209-1 "$2") -eq 1 ]]; then + echo ':: systemd has not been reexecuted. It is recommended that you' + echo ' reboot at your earliest convenience.' + return + fi + + if sd_booted; then + systemctl --system daemon-reexec + fi +} + +_dir_empty() { + set -- "$1"/* + [[ ! -e $1 && ! -L $1 ]] +} + +post_common() { + systemd-sysusers + udevadm hwdb --update + journalctl --update-catalog +} + +_204_1_changes() { + printf '==> The /bin/systemd symlink has been removed. Any references in your\n' + printf ' bootloader (or elsewhere) must be updated to /usr/lib/systemd/systemd.\n' +} + +_205_1_changes() { + printf '==> systemd 205 restructures the cgroup hierarchy and changes internal\n' + printf ' protocols. You should reboot at your earliest convenience.\n' +} + +_206_1_changes() { + printf '==> The "timestamp" hook for mkinitcpio no longer exists. If you used\n' + printf ' this hook, you must remove it from /etc/mkinitcpio.conf. A "systemd"\n' + printf ' hook has been added which provides this functionality, and more.\n' +} + +_208_1_changes() { + if [[ -e var/lib/backlight && ! -e var/lib/systemd/backlight ]]; then + mv -T var/lib/backlight var/lib/systemd/backlight + fi + + if [[ -e var/lib/random-seed && ! -e var/lib/systemd/random-seed ]]; then + mv -T var/lib/random-seed var/lib/systemd/random-seed + fi +} + +_208_8_changes() { + add_journal_acls +} + +_209_1_changes() { + # attempt to preserve existing behavior + + local old_rule=etc/udev/rules.d/80-net-name-slot.rules + local new_rule=etc/udev/rules.d/80-net-setup-link.rules + + echo ":: Network device naming is now controlled by udev's net_setup_link" + echo " builtin. Refer to the systemd.link manpage for a full description." + + # not clear what action we can take here, so don't do anything + [[ -e $new_rule ]] && return 0 + + # rename the old rule to the new one so that we preserve the user's + # existing option. + if [[ -e $old_rule ]]; then + printf ':: Renaming %s to %s in order\n' "${old_rule##*/}" "${new_rule##*/}" + printf ' to preserve existing network naming behavior.\n' + mv -v "$old_rule" "$new_rule" + else + echo ':: No changes have been made to your network naming configuration.' + echo ' Interfaces should continue to maintain the same names.' + fi +} + +_210_1_changes() { + if sd_booted; then + # If /etc/systemd/network is non-empty, then this is a 209 user who used + # networkd. Re-enable it for them. + if ! _dir_empty etc/systemd/network; then + systemctl enable systemd-networkd + fi + fi +} + +_213_4_changes() { + if sd_booted; then + # if /etc/resolv.conf is a symlink, just assume that it was being managed + # by systemd-networkd, and re-enable systemd-resolved. + if [[ -L etc/resolv.conf ]]; then + systemctl enable systemd-resolved + fi + fi +} + +_214_2_changes() { + # /run/systemd/network/resolv.conf -> /run/systemd/resolve/resolv.conf + if [[ etc/resolv.conf -ef run/systemd/network/resolv.conf ]]; then + ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf + + if sd_booted; then + if [[ ! -d run/systemd/resolve ]]; then + mkdir run/systemd/resolve + fi + + if [[ -f run/systemd/network/resolv.conf ]]; then + mv run/systemd/{network,resolve}/resolv.conf + fi + fi + fi + + echo ':: coredumps are no longer sent to the journal by default. To re-enable:' + echo ' echo >/etc/sysctl.d/50-coredump.conf \' + echo ' "kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e"' +} + +_215_2_changes() { + # create at least the symlink from /etc/os-release to /usr/lib/os-release + systemd-tmpfiles --create etc.conf +} + +_216_2_changes() { + echo ':: Coredumps are handled by systemd by default. Collection behavior can be' + echo ' tuned in /etc/systemd/coredump.conf.' +} + +post_install() { + # because systemd can't sanely manage this meanial task... + uuidgen | { + read + echo "${REPLY//-}">etc/machine-id + } + + post_common "$@" + + add_journal_acls + + # enable getty@tty1 by default, but don't track the file + systemctl enable getty@tty1.service + + echo ":: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your" + echo " bootloader to replace sysvinit with systemd, or install systemd-sysvcompat" +} + +post_upgrade() { + post_common "$@" + + maybe_reexec "$@" + + local v upgrades=(204-1 + 205-1 + 206-1 + 208-1 + 208-8 + 209-1 + 210-1 + 213-4 + 214-2 + 215-2 + 216-2) + + for v in "${upgrades[@]}"; do + if [[ $(vercmp "$v" "$2") -eq 1 ]]; then + "_${v//-/_}_changes" + fi + done +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/tupi b/pcr/tupi deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/tupi +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/tupi/PKGBUILD b/pcr/tupi/PKGBUILD new file mode 100644 index 000000000..c82eada67 --- /dev/null +++ b/pcr/tupi/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +pkgname=tupi +pkgver=0.2.git20140724 +pkgcommit=ed31be0cb13892bc6839a58da3d1570e1f49876b # July 24, 2014 +pkgrel=1 +pkgdesc='Tupà is an 2D animation/drawing software (fork of KToon)' +arch=( + x86_64 + i686 +) +url=http://www.maefloresta.com/portal/ +license=GPL2 +depends=( + desktop-file-utils + ffmpeg + quazip + qt5-multimedia + qt5-svg + shared-mime-info + xdg-utils +) +makedepends=( + git + qt5-tools + ruby +) +install=$pkgname.install +source=$pkgname-$pkgver::git+git://anongit.kde.org/tupi#commit=$pkgcommit +sha512sums=SKIP + +prepare() { + cd $pkgname-$pkgver + # fix /lib directory path + sed -i 's|/lib64|/lib|' configure.rb qonf/{configure,test}.rb + # fix qmake path + sed -i 's|qmake|qmake-qt5|g' configure + sed -i '\|path| s|qmake|qmake-qt5| + s|/bin/qmake|/bin/qmake-qt5| + ' qonf/qmake.rb + # fix /usr directory path + sed -i 's|/opt/|/usr/|' qonf/configure.rb +} + +build() { + cd $pkgname-$pkgver + export QTDIR=/usr + ./configure --prefix=/usr + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR=$pkgdir install +} diff --git a/pcr/tupi/tupi.install b/pcr/tupi/tupi.install new file mode 100644 index 000000000..724bfce00 --- /dev/null +++ b/pcr/tupi/tupi.install @@ -0,0 +1,13 @@ +post_install() { + update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/pcr/xcftools b/pcr/xcftools deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/xcftools +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/xcftools/PKGBUILD b/pcr/xcftools/PKGBUILD new file mode 100644 index 000000000..432cc8b93 --- /dev/null +++ b/pcr/xcftools/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer (Arch): Jonathan Frawley <jonathanfrawley@gmail.com> +# Maintainer: Márcio Silva <coadde@parabola.nu> +pkgname=xcftools +pkgver=1.0.7 +pkgrel=2 +pkgdesc="Miscellaneous command line tools for use with the open ${pkgname::3} format used by The GIMP." +url=http://henning.makholm.net/software +arch=( + i686 + x86_64 + mips64el +) +license=( + GPL2 + perl +) +depends=( + libpng + perl +) +optdepends=gimp +makedepends=libpng +source=( + http://henning.makholm.net/$pkgname/$pkgname-$pkgver.tar.gz + $pkgname.patch +) +md5sums=( + fd960b6470fb23520fc4b1ade6cf6e25 + 7439f6a8369a12913243ded6c93d31e1 +) + +build() { + cd $srcdir/$pkgname-$pkgver + patch -i ../$pkgname.patch + /bin/bash configure --prefix=/usr + setarch $CARCH make +} + +package() { + cd $srcdir/$pkgname-$pkgver + setarch $CARCH make DESTDIR=$pkgdir install +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/xcftools/xcftools.patch b/pcr/xcftools/xcftools.patch new file mode 100644 index 000000000..1a2d88c14 --- /dev/null +++ b/pcr/xcftools/xcftools.patch @@ -0,0 +1,27 @@ +diff -rupN xcftools-1.0.7.old/Makefile.in xcftools-1.0.7/Makefile.in +--- xcftools-1.0.7.old/Makefile.in 2009-07-03 11:31:56.000000000 +0100 ++++ xcftools-1.0.7/Makefile.in 2012-01-03 13:03:51.152358830 +0000 +@@ -79,7 +79,7 @@ xcf2pnm$e: xcf2pnm.$o $(FILEIO).$o enums + + xcf2png$e: xcf2png.$o $(FILEIO).$o enums.$o xcf-general.$o utils.$o nlsini.$o \ + pixels.$o flatten.$o flatspec.$o scaletab.$o table.$o palette.$o +- $(CC) $(LDFLAGS) $(LIBS) -lpng $^ -o $@ ++ $(CC) $(LDFLAGS) $(LIBS) $^ -lpng -o $@ + + xcfview: xcfview.in Makefile + sed '1s,/usr/bin/perl,@PERL@,' < $< > $@ +diff -rupN xcftools-1.0.7.old/xcf2png.c xcftools-1.0.7/xcf2png.c +--- xcftools-1.0.7.old/xcf2png.c 2009-07-03 11:31:52.000000000 +0100 ++++ xcftools-1.0.7/xcf2png.c 2012-01-03 13:03:36.262509165 +0000 +@@ -71,9 +71,9 @@ init_output(void) + + outfile = openout(flatspec.output_filename); + libpng = png_create_write_struct(PNG_LIBPNG_VER_STRING, +- png_voidp_NULL, ++ (png_voidp)NULL, + my_error_callback, +- png_error_ptr_NULL); ++ (png_voidp)NULL); + if( !libpng ) + FatalUnexpected(_("Couldn't initialize libpng library")); + diff --git a/pcr/yafaray b/pcr/yafaray deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/yafaray +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/yafaray/PKGBUILD b/pcr/yafaray/PKGBUILD new file mode 100644 index 000000000..105db9293 --- /dev/null +++ b/pcr/yafaray/PKGBUILD @@ -0,0 +1,114 @@ +# Maintainer: Márcio Silva <coadde@parabola.nu> + +_build_pkg=yes +_build_add=yes + +[[ $_build_pkg != yes && $_build_pkg != no ]] && _build_pkg=yes +[[ $_build_add != yes && $_build_add != no ]] && _build_add=yes +[[ $_build_pkg == no && $_build_add == no ]] && _build_add=yes + +_pkgname=yafaray +_pkgver=0.1.5 +_pkgverM=${_pkgver%.*} +_pkgdat=20140508 +_pkgrev=ff262af4b50a90dcf39da04040b53509d7dc789d +_pkgrel=1 +_bldname=blender +_bldver=2.71 +_bldep=14 +_addname=$_bldname-addon-$_pkgname +_addver=$_pkgver # __init__.py:bl_info>version +_adddat=20140425 +_addrev=c3d4ff74593d5bd9552306f597f6b36e342687da +_addrel=3 +_pyver=3.4 + +pkgbase=$_pkgname +[[ $_build_pkg == yes ]] && pkgname+=("$_pkgname") +[[ $_build_add == yes ]] && pkgname+=("$_bldname-addon-$_pkgname") +pkgver=$_pkgver.$_pkgdat +pkgrel=$_pkgrel +arch=('i686' 'x86_64' 'mips64el') +url="http://www.$_pkgname.org" +[[ $_build_pkg == yes ]] && depends=('freetype2' 'libjpeg' 'libxml2' 'openexr') +[[ $_build_pkg == yes ]] && makedepends=('cmake' 'python' 'qt4' 'swig') +[[ $_build_pkg == yes ]] && source+=("$_pkgname-$_pkgver.$_pkgrev.tar.gz::https://github.com/YafaRay/Core/archive/$_pkgrev.tar.gz") +[[ $_build_add == yes ]] && source+=("$_addname-$_addver.$_addrev.tar.gz::https://github.com/YafaRay/${_bldname^}-Exporter/archive/$_addrev.tar.gz") +[[ $_build_pkg == yes ]] && sha512sums+=('089373ebe702361ccd5a8b8ee789188bdb569338f0f406f2fe5e355ef69d2de5f793a5b9e5f85e998fd0b5a42500124d0d35bffee00d177e710347a1a107228e') +[[ $_build_add == yes ]] && sha512sums+=('38b85b14ccf0042012de0e8791ed9264ff389b223ef033f2c9daeccb0388a483c38f9a8aa178819183795ff5dd37c5cdd201f2af23d5e28231bffad7deecd523') + +_prepare_yafaray() { + msg 'Renaming source dir' + mv -v $srcdir/Core-$_pkgrev $srcdir/$_pkgname-$_pkgver.$_pkgrev + + cd $srcdir/$_pkgname-$_pkgver.$_pkgrev + + [[ -d build ]] && rm -vr build + mkdir -v build +} + +_prepare_blender-addon-yafaray() { + msg 'Renaming addon dir' + mv -v $srcdir/${_bldname^}-Exporter-$_addrev $srcdir/$_addname-$_addver.$_addrev + + cd $srcdir/$_addname-$_addver.$_addrev + + msg 'renaming wrong OS name' + sed -i 's|Linux|GNU/Linux| + ' prop/yaf_scene.py +} + +prepare() { + [[ $_build_pkg == yes ]] && _prepare_yafaray + [[ $_build_add == yes ]] && _prepare_blender-addon-yafaray +} + +_build_yafaray() { + cd $srcdir/$_pkgname-$_pkgver.$_pkgrev/build + + cmake .. -DCMAKE_INSTALL_PREFIX=/usr\ + -DYAF_PY_VERSION=$_pyver\ + -DYAF_BINDINGS_PY_DIR=/usr/lib/python$_pyver + make +} +[[ $_build_pkg == yes ]] && build() { _build_yafaray; } + +package_yafaray() { + pkgdesc='A free software raytracing engine' + license=('LGPL2.1') + optdepends=('python: Python bindings' + 'qt4: QT GUI' + "$_addname: ${_bldname^} addon renderer") + + cd $srcdir/$_pkgname-$_pkgver.$_pkgrev/build + make DESTDIR=$pkgdir install + + b=$pkgdir/usr/share/licenses/$pkgname + + install -vd $b && install -vm644 ../LICENSE $b/LGPL-v2.1 +} + +package_blender-addon-yafaray() { + pkgver=$_addver.$_adddat.v$_bldver + pkgrel=$_addrel + pkgdesc="A addon for the ${_bldname^} which allows render with YafaRay (built for the $_bldname package)" + arch=('any') + license=('GPL2') + depends=("$_pkgname>=$_pkgver" "$_pkgname<${_pkgver/.*/}.$((${_pkgverM#*.}+1)).$((${_pkgver/*./}==0))" "$_bldname>=$_bldep:$_bldver" "$_bldname<$(($_bldep+1)):${_bldver/.*/}.$((${_bldver/*./}+1))") + makedepends=() + + cd $srcdir/$_addname-$_addver.$_addrev + + a=$pkgdir/usr/share/$_bldname/$_bldver/scripts/addons + b=$pkgdir/usr/share/licenses/$pkgname + + install -vd $a && cp -va ../$_addname-$_addver.$_addrev $a/$_pkgname + install -vd $b && install -vm644 GPL-license.txt $b/GPL-v2.0 + + install -vd $a/$_pkgname/bin + ln -vsf /usr/lib/lib${_pkgname}core.so $a/$_pkgname/bin/lib${_pkgname}core.so + ln -vsf /usr/lib/lib${_pkgname}plugin.so $a/$_pkgname/bin/lib${_pkgname}plugin.so + ln -vsf /usr/lib/$_pkgname $a/$_pkgname/bin/plugins +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/zoneminder b/pcr/zoneminder deleted file mode 100644 index 4eb47d013..000000000 --- a/pcr/zoneminder +++ /dev/null @@ -1 +0,0 @@ -moved to [ssh://git@projects.parabola.nu/~git/pcr.git/pcr] git repo diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD new file mode 100644 index 000000000..5b4335a0a --- /dev/null +++ b/pcr/zoneminder/PKGBUILD @@ -0,0 +1,120 @@ +# Contributor (Arch): Troy Will <troydwill@gmail.com> +# Contributor (Arch): /dev/rs0 </dev/rs0@secretco.de.com> +# Contributor (Arch): Jacek Burghardt <jacek@hebe.us> +# Contributor (Arch): Vojtech Aschenbrenner <v@asch.cz> +# Contributor (Arch): Jason Gardner <buhrietoe@gmail.com> +# Contributor (Arch): Ross melin <rdmelin@gmail.com> +# Maintainer: Márcio Silva <coadde@parabola.nu> +# Contributor: André Silva <emulatorman@parabola.nu> +# Orginally based on a Debian Squeeze package + +pkgname=zoneminder +pkgver=1.28.0 +pkgrel=1 +pkgdesc='Capture, analyse, record and monitor video security cameras' +arch=('i686' 'x86_64' 'mips64el' 'arm') +backup=('etc/zm.conf') +url="https://github.com/ZoneMinder/ZoneMinder/releases" +license=('GPL2') +depends=('apache' 'cambozola' 'ffmpeg' 'gnutls' 'mariadb' 'perl-archive-zip' 'perl-date-manip' 'perl-dbd-mysql' 'perl-dbi' + 'perl-expect' 'perl-libwww' 'perl-mime-lite' 'perl-mime-tools' 'perl-php-serialization' 'perl-net-sftp-foreign' + 'perl-sys-mmap' 'perl-time-modules' 'php' 'php-apache' 'php-gd' 'php-mcrypt') +makedepends=('netpbm' 'cmake') +optdepends=('netpbm') +options=(!libtool) +install=$pkgname.install +source=(https://github.com/ZoneMinder/ZoneMinder/archive/v$pkgver.tar.gz + httpd-$pkgname.conf + $pkgname.service + sysctl-$pkgname.conf) +sha512sums=('3e18993b0539729491052c97d8c94227ccc089eb40277c2f07682f30049033303c7cfe9734fdac6d33ae67df29c76eb72bf7fbb5dae8227e8831fa603b61c375' + '4ce0d8eba9d006d258f5b8a83920fc17f1f602b96518d37b7a47cd9b6eb84ef2587641a6ba839a469c3f0e33b46475866187279ae3f8be0d4054b074ee5d6b08' + 'cfb0eb87a989236c72741a496ddc6a73aa2696e5beaaca4836d3c231ddb24c7ef5e9f65e7afa49674f2115cbfa4a07c75486e1947ce294c816ddbb875f3b99cf' + '7330c179f1e2db815a675560d3d84648be02f7d0292f8cbe21d6033577fe688ed71ad23b5b8c9dc309395b45ebb554f9499e7a4b57091959b69679011fa59044') + +prepare() { + cd $srcdir/ZoneMinder-$pkgver + + # Patch for disable ZM_CHECK_FOR_UPDATES + sed -i '\|ZM_CHECK_FOR_UPDATES|,+1 s|yes|no|; + ' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in + + # Patch for support html5 video and flv + sed -i '\|ZM_MPEG_LIVE_FORMAT|,+1 s|swf|ogg|; + \|ZM_MPEG_REPLAY_FORMAT|,+1 s|swf|ogg|; + \|ZM_FFMPEG_FORMATS|,+1 s|mpg mpeg wmv asf avi[*] mov swf 3gp[*][*]|mpg mpeg wmv asf avi* mov flv swf 3gp** webm ogg matroska mp4 h264|; + ' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in + + # Patch for change ZM name to ZoneMinder + sed -i '\|ZM_WEB_TITLE_PREFIX|,+1 s|"ZM"|"ZoneMinder"|; + ' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in + + # Patch for remove HACK in Makefile.am + sed -i '\|This is a HACK|d; + \|^install-data-hook:$|,+5 d; + s| install-data-hook||; + \|^uninstall-hook:$|,+5 d; + s| uninstall-hook||; + ' Makefile.am +} + +build() { + cd $srcdir/ZoneMinder-$pkgver + + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + -DZM_TARGET_DISTRO=arch \ + -DZM_CGIDIR=/srv/http/cgi-bin \ + -DZM_CONTENTDIR=/var/cache/$pkgname \ + -DZM_LOGDIR=/var/log/$pkgname \ + -DZM_RUNDIR=/run/$pkgname \ + -DZM_SOCKDIR=/run/$pkgname \ + -DZM_TMPDIR=/var/tmp \ + -DZM_WEB_USER=http \ + -DZM_WEB_GROUP=http \ + -DZM_WEBDIR=/srv/http/$pkgname + + make V=0 +} + +package() { + cd $srcdir/ZoneMinder-$pkgver + + make DESTDIR=$pkgdir install + + # BEGIN CREATE_ZONEMINDER_DIRECTORIES + #mkdir -pv $pkgdir/{etc/{httpd/conf/extra,sysctl.d},srv/http/cgi-bin,usr/{lib/systemd/system,share/{licenses/$pkgname,$pkgname/db}}} + mkdir -pv $pkgdir/run/zm + chown -v http.http $pkgdir/run/zm + mkdir -pv $pkgdir/var/{cache/$pkgname,log/$pkgname} + mkdir -pv $pkgdir/srv/http/$pkgname/socks + chown -Rv http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/$pkgname}} + chown -Rv http.http $pkgdir/srv/http/$pkgname/socks + chmod -v 0700 $pkgdir/etc/zm.conf + # END CREATE_ZONEMINDER_DIRECTORIES + + # Make content directories in /var/cache/$pkgname and link them + for i in events images temp; do + #mv -v $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i + mkdir -v $pkgdir/var/cache/$pkgname/$i + #chown -v http.http $pkgdir/var/cache/$pkgname/$i + ln -sv /var/cache/$pkgbase/$i $pkgdir/srv/http/$pkgname/$i + chown -hv http.http $pkgdir/srv/http/$pkgname/$i + done + + # Create a link to the Zoneminder cgi binaries + ln -sv /srv/http/cgi-bin $pkgdir/srv/http/$pkgname + + chown -hv http.http $pkgdir/srv/http/{cgi-bin,$pkgname,$pkgname/cgi-bin} + + # Link Cambozola + ln -vs /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname + + # Install configuration files + #mkdir -pv $pkgdir/etc/httpd/conf/extra + install -vDm 644 $srcdir/httpd-$pkgname.conf $pkgdir/etc/httpd/conf/extra + #mkdir -pv $pkgdir/usr/lib/systemd/system + install -vDm 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system + install -vDm 644 $srcdir/sysctl-$pkgname.conf $pkgdir/etc/sysctl.d + install -vDm 644 COPYING $pkgdir/usr/share/licenses/$pkgname + install -vDm 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db +} diff --git a/pcr/zoneminder/httpd-zoneminder.conf b/pcr/zoneminder/httpd-zoneminder.conf new file mode 100644 index 000000000..cdb7722dc --- /dev/null +++ b/pcr/zoneminder/httpd-zoneminder.conf @@ -0,0 +1,20 @@ +# /etc/httpd/conf/extra/httpd-zm.conf +# Config for zoneminder web app + +Alias /zm "/srv/http/zoneminder" +<Directory "/srv/http/zoneminder"> + Options -Indexes +MultiViews +FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + # The code unfortunately uses short tags in many places + php_value short_open_tag On +</Directory> + +ScriptAlias /cgi-bin "/srv/http/cgi-bin" +<Directory "/srv/http/cgi-bin"> + AllowOverride None + Options +ExecCGI +FollowSymLinks + Order allow,deny + Allow from all +</Directory> diff --git a/pcr/zoneminder/sysctl-zoneminder.conf b/pcr/zoneminder/sysctl-zoneminder.conf new file mode 100644 index 000000000..ec1407dee --- /dev/null +++ b/pcr/zoneminder/sysctl-zoneminder.conf @@ -0,0 +1,3 @@ +# For Zoneminder Monitor +#kernel.shmall = 524288000 +#kernel.shmmax = 524288000 diff --git a/pcr/zoneminder/zoneminder.install b/pcr/zoneminder/zoneminder.install new file mode 100644 index 000000000..1c8789a4a --- /dev/null +++ b/pcr/zoneminder/zoneminder.install @@ -0,0 +1,179 @@ +#!/usr/bin/bash +pre_install() { + set -e + abort=false + if [ -L /srv/http/zoneminder/events ]; then + l=$(readlink /srv/http/zoneminder/events) + if [ $l != /var/cache/zoneminder/events ]; then + abort=true + fi + fi + if [ -L /srv/http/zoneminder/images ]; then + l=$(readlink /srv/http/zoneminder/images) + if [ $l != /var/cache/zoneminder/images ]; then + abort=true + fi + fi + if [ $abort = true ]; then + cat >&2 << EOF +Aborting installation of zoneminder due to non-default symlinks in +/srv/http/zoneminder for the images and/or events directory, which could +result in loss of data. Please move your data in each of these directories to +/var/cache/zoneminder before installing zoneminder from the package. +EOF + exit 1 + fi + exit 0 +} + +post_install() { + if [[ -d /var/log/zoneminder ]]; then + chmod -v 0755 /var/log/zoneminder + chown -v http.http /var/log/zoneminder + else + mkdir -vm 0755 /var/log/zoneminder + chown -v http.http /var/log/zoneminder + fi + if [[ -d /tmp/zoneminder ]]; then + chmod -v 0700 /tmp/zoneminder + chown -v http.http /tmp/zoneminder + else + mkdir -vm 0700 /tmp/zoneminder + chown -v http.http /tmp/zoneminder + fi + + # edit /etc/php.ini for Zoneminder + sed -e ' + # Enable these libraries by removing the leading comment character + \|^;extension=mysql.so$| s|^;||; + \|^;extension=mysqli.so$| s|^;||; + \|^;extension=pdo_mysql.so$| s|^;||; + \|^;extension=gd.so$| s|^;||; + \|^;extension=gettext.so$| s|^;||; + \|^;extension=mcrypt.so$| s|^;||; + \|^;extension=session.so$| s|^;||; + \|^;extension=sockets.so$| s|^;||; + \|^;extension=openssl.so$| s|^;||; + \|^;extension=ftp.so$| s|^;||; + \|^;extension=zip.so$| s|^;||; + + # Add zoneminder paths to open_basedir + s|^open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/$|&:/etc:/srv/http/zoneminder/|; + ' /etc/php/php.ini > /etc/php/php.ini.zoneminder + + # edit /etc/httpd/conf/httpd.conf for Zoneminder + sed -e ' + # Use mod_mpm_prefork instead of mod_mpm_event.so (FS#39218). + s|^LoadModule mpm_event_module modules/mod_mpm_event.so$|#&\nLoadModule mpm_prefork_module modules/mod_mpm_prefork.so|; + + # Zoneminder requires cgi + \|^#LoadModule cgi_module modules/mod_cgi.so$| s|#||; + + # libphp5 + \|^LoadModule php5_module modules/libphp5.so$|d; + s|^#*LoadModule rewrite_module modules/mod_rewrite.so$|&\nLoadModule php5_module modules/libphp5.so|; + \|^Include /etc/httpd/conf/extra/php5_module.conf|d; + s|^Include conf/extra/httpd-default.conf$|&\nInclude /etc/httpd/conf/extra/php5_module.conf|; + + # Include httpd-zoneminder.conf + \|^Include /etc/httpd/conf/extra/httpd-zoneminder.conf$|d; + s|^# Server-pool management (MPM specific)$|\nInclude /etc/httpd/conf/extra/httpd-zoneminder.conf\n&|; + ' /etc/httpd/conf/httpd.conf > /etc/httpd/conf/httpd.conf.zoneminder + + cat << EOF +Note for mysql: +==> To run Zoneminder, you must install the database running mysql service (as root): +==> "systemctl start mysqld.service" +==> and add Zoneminder database typing (with passsword): +==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload" +==> "cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p" +==> "echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql" +==> (or without passsword): +==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload" +==> "cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf" +==> "echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/my.cnf mysql" + +Note for php: +==> You must uncomment that line in /etc/php/php.ini: +==> "extension=mysql.so" +==> check and make sure these are uncommented: +==> "extension=gd.so" +==> "extension=gettext.so" +==> "extension=mcrypt.so" +==> "extension=mysqli.so" +==> "extension=session.so" +==> "extension=sockets.so" +==> "extension=openssl.so" +==> "extension=ftp.so" +==> "extension=zip.so" +==> check and add to open_basedir "/etc" and +==> "/srv/http/zoneminder" like so +==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder" +==> and set your timezone in php.ini: +==> "date.timezone = <your_country>/<your_city>" + +Note for apache: +==> You must edit /etc/httpd/conf/httpd.conf and add the line: +==> "LoadModule php5_module modules/libphp5.so" +==> and: +==> "Include /etc/httpd/conf/extra/php5_module.conf" +==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf" +EOF +} + +post_upgrade() { + post_install + /usr/bin/zmupdate.pl -f >/dev/null +} + +post_remove() { + if [[ -d /tmp/zoneminder ]]; then + rm -vr /tmp/zoneminder + fi + #sed -i -e ' + # /^open_basedir/ s/:\/srv\/http\/zoneminder//; + # /^open_basedir/ s/:\/srv\/http\/zoneminder\///; + # ' /etc/php/php.ini || read + #sed -i -e ' + # /^# ZoneMinder/d; + # /Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d; + # ' /etc/httpd/conf/httpd.conf || read + + cat << EOF +Note: +==> To clean Zoneminder mysql database, run as root (with password): +==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql" +==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql" +==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zm" +==> (or without password): +==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql" +==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql" +==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm" + +==> Disable http with php if it isn't needed with others servers, +==> comment or remove that lines in /etc/httpd/conf/httpd.conf: +==> "LoadModule php5_module modules/libphp5.so" +==> "Include /etc/httpd/conf/extra/php5_module.conf" + +==> Remove line in /etc/httpd/conf/httpd.conf: +==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf" + +==> Disable php with mysql if it isn't needed with others servers, +==> comment that lines in /etc/php/php.ini: +==> "extension=mysql.so" +==> "extension=gd.so" +==> "extension=gettext.so" +==> "extension=mcrypt.so" +==> "extension=mysqli.so" +==> "extension=session.so" +==> "extension=sockets.so" +==> "date.timezone = <my_country>/<my_city>" + +==> Edit /etc/php/php.ini and remove "/etc" and "/srv/http/zoneminder" +==> in the "open_basedir". + +==> Remove log files and "zonemider" directory in "/var/log/zoneminder". + +==> Backup and remove "events", "images" and "temp" dirs in "/var/cache/zoneminder". +EOF +} diff --git a/pcr/zoneminder/zoneminder.service b/pcr/zoneminder/zoneminder.service new file mode 100644 index 000000000..83d992aa7 --- /dev/null +++ b/pcr/zoneminder/zoneminder.service @@ -0,0 +1,18 @@ +# ZoneMinder systemd unit file +# This file is intended to work with all distributions with Systemd + +[Unit] +Description=ZoneMinder CCTV recording and security system +After=network.target mysqld.service httpd.service +Requires=mysqld.service httpd.service + +[Service] +User=http +Type=forking +ExecStart=/usr/bin/zmpkg.pl start +ExecReload=/usr/bin/zmpkg.pl restart +ExecStop=/bin/bash -c '[[ "$(/usr/bin/pgrep zmdc.pl)" > 0 ]] && /usr/bin/zmpkg.pl stop' +PIDFile="/run/zm/zm.pid" + +[Install] +WantedBy=multi-user.target |