diff options
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/debootstrap/PKGBUILD | 20 | ||||
-rw-r--r-- | pcr/debootstrap/debootstrap.install | 14 | ||||
-rw-r--r-- | pcr/ffmpeg-static/PKGBUILD | 4 | ||||
-rwxr-xr-x | pcr/minetest/PKGBUILD | 4 | ||||
-rwxr-xr-x | pcr/ryzom-client/PKGBUILD | 69 | ||||
-rwxr-xr-x | pcr/ryzom-nel/PKGBUILD | 87 | ||||
-rw-r--r--[-rwxr-xr-x] | pcr/yate/PKGBUILD | 11 | ||||
-rw-r--r-- | pcr/zoneminder/PKGBUILD | 154 | ||||
-rw-r--r-- | pcr/zoneminder/httpd-zm.conf | 20 | ||||
-rw-r--r-- | pcr/zoneminder/patch-ffmpeg-configure.patch | 26 | ||||
-rw-r--r-- | pcr/zoneminder/zoneminder.install | 61 |
11 files changed, 318 insertions, 152 deletions
diff --git a/pcr/debootstrap/PKGBUILD b/pcr/debootstrap/PKGBUILD new file mode 100644 index 000000000..9f03c48db --- /dev/null +++ b/pcr/debootstrap/PKGBUILD @@ -0,0 +1,20 @@ +# $Id$ +# Maintainer: André Silva <emulatorman@lavabit.com> + +pkgname=debootstrap +pkgver=1.0.26 +pkgrel=1 +pkgdesc="A tool used to create a gNewSense base system from scratch, without requiring the availability of dpkg or apt" +arch=('any') +license=('GPL') +url="http://www.gnewsense.org" +depends=('bash' 'wget') +source=("http://archive.gnewsense.org/gnewsense-three/gnewsense/pool/overlays/parkes/kgoetz/${pkgname}/${pkgname}_${pkgver}+squeeze1+gnewsense1_all.deb") +install="debootstrap.install" +md5sums=('2049317eac54c0fac6c3201a90fadc18') + +build(){ + tar -xzf "${srcdir}/data.tar.gz" -C "${pkgdir}/" + # doesn't work with gpg 2.x, patch to point to gpgv1 + sed 's/gpgv/gpgv1/g;' -i "${pkgdir}/usr/sbin/debootstrap" "${pkgdir}/usr/share/debootstrap/functions" +} diff --git a/pcr/debootstrap/debootstrap.install b/pcr/debootstrap/debootstrap.install new file mode 100644 index 000000000..85a99f160 --- /dev/null +++ b/pcr/debootstrap/debootstrap.install @@ -0,0 +1,14 @@ +post_install() { + if [ "$(uname -m)" = "x86_64" ]; then + darch="amd64" + elif [ "$(uname -m)" = "i386" ]; then + darch="i386" + else + darch="mips64el" + fi + echo "$darch" > /usr/share/debootstrap/arch +} + +pre_remove() { + rm -f /usr/share/debootstrap/arch +} diff --git a/pcr/ffmpeg-static/PKGBUILD b/pcr/ffmpeg-static/PKGBUILD index 592c4a7bf..67ce115bb 100644 --- a/pcr/ffmpeg-static/PKGBUILD +++ b/pcr/ffmpeg-static/PKGBUILD @@ -5,7 +5,7 @@ # Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> pkgname=ffmpeg-static -pkgver=0.11.2 +pkgver=1.0 pkgrel=1 epoch=1 pkgdesc='Complete and free Internet live audio and video broadcasting solution for GNU/Linux, with static library' @@ -17,7 +17,7 @@ makedepends=(yasm libvdpau) provides=(${pkgname%-static}) conflicts=(${pkgname%-static}) source=(http://${pkgname%-static}.org/releases/${pkgname%-static}-$pkgver.tar.bz2) -md5sums=(93c1908022567b321df74db7214da6ac) +md5sums=(3ed526cea20c1bffb5a37f7730f710bd) build() { cd ${pkgname%-static}-$pkgver diff --git a/pcr/minetest/PKGBUILD b/pcr/minetest/PKGBUILD index 8d11e3747..18546b470 100755 --- a/pcr/minetest/PKGBUILD +++ b/pcr/minetest/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Jorge Araya Navarro <jorgean@lavabit.com> pkgname=minetest-git -pkgver=20120409 -pkgrel=1 +pkgver=20120918 +pkgrel=2 pkgdesc="An Infiniminer/Minecraft inspired game, git version." arch=('i686' 'x86_64') url="http://celeron.55.lt/~celeron55/minetest/" diff --git a/pcr/ryzom-client/PKGBUILD b/pcr/ryzom-client/PKGBUILD index dbcd531f4..fce700054 100755 --- a/pcr/ryzom-client/PKGBUILD +++ b/pcr/ryzom-client/PKGBUILD @@ -1,42 +1,63 @@ # Maintainer: Jorge Araya Navarro <jorgean@lavabit.com> -pkgname=('ryzom-client') -pkgver=0.8.0 -pkgrel=7 +pkgname=ryzom-client-hg +pkgver=2691 +pkgrel=3 +pkgdesc='An awesome free software 3D MMORPG game' arch=('x86_64' 'i686') url="http://www.ryzom.com" license=('AGPL3') -pkgdesc="An awesome free software 3D MMORPG game" -depends=('ryzom-data' 'ryzom-nel' 'luabind') -conflicts=('ryzom-client') groups=('ryzom') +depends=('ryzom-data' 'ryzom-nel-hg' 'luabind') +makedepends=('mercurial' 'kervalasquish-hg' + 'cmake' 'bison' 'lua' 'luabind' + 'curl' 'libpng' 'libwww' + 'boost' 'ryzom-nel-hg') -makedepends=('kervalasquish-hg' 'cmake' 'bison' - 'lua' 'luabind' 'curl' 'libpng' 'libwww' - 'boost' 'ryzom-nel') +conflicts=('ryzom-client' 'ryzom-client-hg') +replaces=('ryzom-client') +backup=('etc/client_default.cfg') +source=('ftp://ftp.ryzom.com/1210062202_client_default.cfg') +noextract=() -auser="shackra" -achangeset="56d1642e24ac" - -source=("https://bitbucket.org/$auser/ryzom/get/$achangeset.tar.gz") +_hgroot=http://ryzom.hg.sourceforge.net:8000/hgroot/ryzom/ryzom +_hgrepo=ryzom build() { - cd "$srcdir/$auser-ryzom-$achangeset/code" - if [[ -d "ryzom-client" ]]; then - rm -rf "ryzom-client" - mkdir "ryzom-client" + cd "$srcdir" + msg "Connecting to Mercurial server...." + + if [[ -d "$_hgrepo" ]]; then + cd "$_hgrepo" + hg pull -u + msg "The local files are updated." else - mkdir "ryzom-client" + hg clone "$_hgroot" "$_hgrepo" fi - - cd "ryzom-client" - cmake .. -Wno-dev -DFINAL_VERSION=ON -DWITH_RYZOM_CLIENT=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL=OFF -DCMAKE_INSTALL_PREFIX=/usr -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/bin - make -j3 + msg "Mercurial checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_hgrepo-build" + cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" + mkdir "$srcdir/$_hgrepo-build/code/ryzom-client" + cd "$srcdir/$_hgrepo-build/code/ryzom-client" + + # + # BUILD HERE + # + cmake .. -Wno-dev -DFINAL_VERSION=ON -DWITH_RYZOM_CLIENT=ON -DWITH_LUA51=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_LIBWWW_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL=OFF -DCMAKE_INSTALL_PREFIX=/usr -DRYZOM_ETC_PREFIX=/etc -DRYZOM_GAMES_PREFIX=bin + + make -j3 + + # Replacing client_default.cfg file + cp "$srcdir/1210062202_client_default.cfg" "$srcdir/$_hgrepo-build/code/ryzom-client/ryzom/client/client_default.cfg" + sed -i s/"data"/"\/usr\/share\/ryzom\/data"/ "$srcdir/$_hgrepo-build/code/ryzom-client/ryzom/client/client_default.cfg" + sed -i 's/= 1\.33333;/= 1\.7777;/' "$srcdir/$_hgrepo-build/code/ryzom-client/ryzom/client/client_default.cfg" } package() { - cd "$srcdir/$auser-ryzom-$achangeset/code/$pkgname" + cd "$srcdir/$_hgrepo-build/code/ryzom-client" make DESTDIR="$pkgdir" install } -sha256sums=('0abcf7daa01dab27a3b9a9276e521369693963be3a25624b3195023495212bc2') +sha256sums=('0753c04dd7d61c43ec88d59428752b609d65f439eb1de9018bf922294e65966f') diff --git a/pcr/ryzom-nel/PKGBUILD b/pcr/ryzom-nel/PKGBUILD index b45bef098..bc9fa3199 100755 --- a/pcr/ryzom-nel/PKGBUILD +++ b/pcr/ryzom-nel/PKGBUILD @@ -1,53 +1,68 @@ # Maintainer: Jorge Araya Navarro <jorgean@lavabit.com> -pkgname='ryzom-nel' -pkgver=0.8.0 -pkgrel=11 +pkgname=ryzom-nel-hg +pkgver=2687 +pkgrel=3 +pkgdesc='An awesome free software 3D MMORPG game, NeL engine' arch=('x86_64' 'i686') -conflicts=('ryzom-nel') -groups=('ryzom') - -pkgdesc="An awesome free software 3D MMORPG game, NeL engine" url="http://www.ryzom.com" license=('AGPL3') -depends=('freetype2' - 'libx11' - 'mesa' - 'libxxf86vm' - 'openal' - 'freealut' - 'libogg' - 'libvorbis' - 'libxml2' - 'libjpeg' - 'rrdtool' ) -makedepends=('cmake' 'bison' 'kervalasquish-hg') - -auser="shackra" -achangeset="56d1642e24ac" - -source=("https://bitbucket.org/$auser/ryzom/get/$achangeset.tar.gz") +groups=('ryzom') +depends=('mercurial' + 'freetype2' + 'libx11' + 'mesa-git' + 'libxxf86vm' + 'openal' + 'freealut' + 'libogg' + 'libvorbis' + 'libxml2' + 'libjpeg-turbo' + 'rrdtool' + 'libgl-git') +makedepends=('mercurial' 'cmake' 'bison') + +conflicts=('ryzom-nel' 'ryzom-nel-hg') +replaces=('ryzom-nel') +backup=('etc/nel/build_ig_boxes.cfg' + 'etc/nel/build_indoor_rbank.cfg' + 'etc/nel/build_rbank.cfg' + 'etc/nel/make_sheet_id.cfg' + 'etc/nel/zviewer.cfg') + +_hgroot=http://ryzom.hg.sourceforge.net/hgroot/ryzom/ryzom +_hgrepo=ryzom build() { - cd "$srcdir/$auser-ryzom-$achangeset/code" - - if [[ -d $pkgname ]]; then - rm -rf $pkgname - mkdir $pkgname + cd "$srcdir" + msg "Connecting to Mercurial server...." + + if [[ -d "$_hgrepo" ]]; then + cd "$_hgrepo" + hg pull -u + msg "The local files are updated." else - mkdir $pkgname + hg clone "$_hgroot" "$_hgrepo" fi - cd $pkgname + msg "Mercurial checkout done or server timeout" + msg "Starting build..." - #CMAKE_USE_RELATIVE_PATHS=true - cmake .. -Wno-dev -DWITH_RYZOM=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL=ON -DCMAKE_INSTALL_PREFIX=/usr -DNL_ETC_PREFIX=/etc/nel -DNL_DRIVER_PREFIX=/usr/lib/nel -DNL_SHARE_PREFIX=/usr/share/nel -DNL_BIN_PREFIX=/usr/bin -DNL_SBIN_PREFIX=/usr/sbin -DNL_LIB_PREFIX=/usr/lib/nel -DNL_DRIVER_PREFIX=/usr/lib/nel + rm -rf "$srcdir/$_hgrepo-build" + cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" + mkdir "$srcdir/$_hgrepo-build/code/ryzom-nel" + cd "$srcdir/$_hgrepo-build/code/ryzom-nel" - make -j3 + # + # BUILD HERE + # + cmake .. -Wno-dev -DWITH_RYZOM=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL=ON -DCMAKE_INSTALL_PREFIX=/usr -DNL_ETC_PREFIX=/etc/nel + + make -j3 } package() { - cd "$srcdir/$auser-ryzom-$achangeset/code/$pkgname" + cd "$srcdir/$_hgrepo-build/code/ryzom-nel" make DESTDIR="$pkgdir" install } -sha256sums=('0abcf7daa01dab27a3b9a9276e521369693963be3a25624b3195023495212bc2') diff --git a/pcr/yate/PKGBUILD b/pcr/yate/PKGBUILD index 01428fa27..e668cd3ae 100755..100644 --- a/pcr/yate/PKGBUILD +++ b/pcr/yate/PKGBUILD @@ -2,20 +2,21 @@ # Contributor: Yejun Yang <yejunx AT gmail DOT com> # Contributor: Biru Ionut <ionut@archlinux.ro> pkgname=yate - pkgver=4.1.0 + pkgver=4.2.0 pkgrel=1 pkgdesc="next-generation telephony engine" arch=('i686' 'x86_64') url="http://yate.null.ro" license=('GPL') depends=('speex' 'gsm' 'postgresql-libs' 'libmysqlclient' \ - 'alsa-lib') + 'alsa-lib' 'qt') makedepends=('pkgconfig') - source=(http://yate.null.ro/tarballs/yate4/${pkgname}-${pkgver}-1.tar.gz yate.init) + source=(http://yate.null.ro/tarballs/yate4/${pkgname}-${pkgver}-2.tar.gz yate.init) options=(!makeflags) - md5sums=('06adaa9b8dc4f18908b35e9659ab9ad5' - 'c0d344607046c47c1d75ac23d323817a') + md5sums=('e6fd37f26ff5c50aa3fa16f6b2803d68' + 'c0d344607046c47c1d75ac23d323817a') + build() { cd $srcdir/${pkgname} diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD index 91c6c9175..64c3f94b0 100644 --- a/pcr/zoneminder/PKGBUILD +++ b/pcr/zoneminder/PKGBUILD @@ -8,14 +8,14 @@ pkgname=zoneminder pkgver=1.25.0 -pkgrel=16 +pkgrel=19 pkgdesc='Capture, analyse, record and monitor video security cameras' arch=(i686 x86_64 mips64el) backup=(etc/zm.conf etc/httpd/conf/extra/httpd-zm.conf) url=http://www.$pkgname.com license=(GPL) depends=( - apache cambozola ffmpeg gnutls mysql perl-archive-zip perl-date-manip + apache cambozola ffmpeg-static gnutls mysql 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 perl-x10 php php-apache php-gd php-mcrypt @@ -24,91 +24,137 @@ makedepends=(netpbm) install=$pkgname.install source=( http://www.$pkgname.com/downloads/ZoneMinder-$pkgver.tar.gz - patch-ffmpeg-0.11.patch - patch-libavcodec-detection.patch - $pkgname-1.25.0-kernel35.patch httpd-zm.conf zm.rc.d $pkgname.service + patch-ffmpeg-0.11.patch ) md5sums=( eaefa14befd482154970541252aa1a39 - 81c8be870260142e2633eedf73c72040 - 94bf5d95fe5429f7df458ddfbabf0c12 - 48a3c48394e18bf072f7b32730db18df - 831e3538facff18e27d402e36dbd6b8d + 72380d8793a784ec24cb6809aea4a739 034b61cda8849fc3001849e76ef26041 7487cc72ead82aea0bc78f2e4106ae1a + 81c8be870260142e2633eedf73c72040 ) build() { cd $srcdir/ZoneMinder-$pkgver - export CPPFLAGS=-D__STDC_CONSTANT_MACROS \ + export CPPFLAGS=-D__STDC_CONSTANT_MACROS\ ZM_SSL_LIB=gnutls # Patch for GCC 4.7.x - sed -i -e '1 s/^/#include <unistd.h>\n/;' src/zm_logger.cpp - sed -i -e '1 s/^/#include <unistd.h>\n/;' src/zm_thread.h + sed -i -e 's/^#include <errno.h>/#include <errno.h>\n#include <unistd.h>/'\ + src/zm_logger.cpp || read + sed -i -e 's/^#include <pthread.h>/#include <pthread.h>\n#include <unistd.h>/'\ + src/zm_thread.h || read + + # Patch for automake 1.12 + sed -i -e '/am__api_version=/ s/1.11/1.12/'\ + configure || read + + # Patch for disable ZM_CHECK_FOR_UPDATES + sed -i -e '/ZM_CHECK_FOR_UPDATES/,+1 s/yes/no/'\ + scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read + + # Patch for support html5 video and flv + sed -i -e '/ZM_MPEG_LIVE_FORMAT/,+1 s/swf/webm/;/ZM_MPEG_REPLAY_FORMAT/,+1 s/swf/webm/; + /ZM_FFMPEG_FORMATS/,+1 s/mpg mpeg wmv asf avi\* mov swf 3gp\*\*/mpg mpeg wmv asf avi\* mov flv swf 3gp\*\* webm ogg h254/'\ + scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read + + # Patch for change path + sed -i -e '/ZM_PATH_SOCKS/,+1 s/tmp\/zm/run/; + /ZM_PATH_LOGS/,+1 s/zm/zonemider/; + /ZM_PATH_SWAP/,+1 s/zm/zonemider/'\ + scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read + + # Patch for v4l1 compat + sed -i -e "s/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};\n$ENV{LD_PRELOAD} = \'\/usr\/lib\/libv4l\/v4l1compat.so\' ;/"\ + scripts/zmdc.pl.in || read + + # Patch for add more socket tries + sed -i -e '/$max_socket_tries/ s/3/15/'\ + web/ajax/stream.php || read + + # Patch for wrong "suppported" + sed -i -e 's/suppported/supported/'\ + src/zm_local_camera.cpp || read + + # Patch for type cast in linux-libre kernel 3.5 + sed -i -e 's/enum v4l2_buf_type type = v4l2_data.fmt.type;/enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;/'\ + src/zm_local_camera.cpp || read + + # Patch for drop custom perl install paths + sed -i -e '/# Slight hack for non-standard perl install paths/,+10 d; + s/^AC_SUBST(ZM_CONFIG,"$SYSCONFDIR\/zm.conf")/AC_SUBST(ZM_CONFIG,"$SYSCONFDIR\/zm.conf")\n\nEXTRA_PERL_LIB="# Include from system perl paths only"\nPERL_MM_PARMS="INSTALLDIRS=vendor"/'\ + configure.ac # Patch for support new ffmpeg patch -p1 < $srcdir/patch-ffmpeg-0.11.patch - - # Patch for correct libavcodec detection - patch -p0 < $srcdir/patch-libavcodec-detection.patch - - # Patch for type cast in kernel3.5 - patch -p0 < $srcdir/$pkgname-1.25.0-kernel35.patch - - ./configure --prefix=/usr \ - --build \ - --enable-crashtrace=yes \ - --enable-debug=yes \ - --enable-mmap=yes \ - --mandir=/usr/share/man \ - --sysconfdir=/etc \ - --with-cgidir=/usr/lib/$pkgname/cgi-bin \ - --with-ffmpeg=/usr \ - --with-libarch=lib \ - --with-mysql=/usr \ - --with-webdir=/usr/share/$pkgname \ - --with-webgroup=http \ +# sed -i -e 's/if ( av_open_input_file( \&mFormatContext, mPath.c_str(), NULL, 0, NULL ) !=0 )/if ( avformat_open_input( \&mFormatContext, mPath.c_str(), NULL, NULL ) !=0 )/; +# s/if ( avcodec_open( mCodecContext, mCodec ) < 0 )/if ( avcodec_open2( mCodecContext, mCodec, NULL ) < 0 )/'\ +# src/zm_ffmpeg_camera.cpp +# sed -i -e 's/if ( av_set_parameters(ofc, NULL) < 0 )/\/\*\n \* Removed in last ffmpeg\n \* if ( av_set_parameters(ofc, NULL) < 0 )/; +# /Panic( "Invalid output format parameters" );/,+1 s/}/}\*/; +# /if ( avio_open(&ofc->pb, filename, URL_WRONLY) < 0 )/ s/URL_WRONLY/AVIO_FLAG_WRITE/; +# s/av_write_header(ofc);/avformat_write_header(ofc, NULL);/'\ +# src/zm_mpeg.cpp + sed -i -e 's/avcodec_init/avcodec_open/'\ + configure{,.ac} + + # Patch for support ffmpeg with <libavutil/mathematics.h> and C library + sed -i -e 's/^extern "C" {/extern "C" {\n#ifdef _STDINT_H\n#undef _STDINT_H\n#endif\n#include <stdint.h>/ + s/^#include <libavutil\/avutil.h>/#include <libavutil\/avutil.h>\n#include <libavutil\/mathematics.h>/'\ + src/zm_ffmpeg.h + sed -i -e 's/^AM_CONFIG_HEADER(config.h)/AM_CONFIG_HEADER(config.h)\n\nAC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS])/; + s/^AC_CHECK_HEADERS(mysql\/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),)/AC_CHECK_HEADERS(mysql\/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),)\nAC_LANG_PUSH([C])/; + s/^AC_CHECK_HEADERS(libswscale\/swscale.h,,,)/AC_CHECK_HEADERS(libswscale\/swscale.h,,,)\nAC_LANG_POP([C])/'\ + configure.ac + + # Patch for wrong install run, tmp and log dir + sed -i -e '/ install-data-hook/d;/install-data-hook:/d;/# Yes, you are correct. This is a HACK!/d; + / ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )/d; + / ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "\/var\/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi )/d; + / ( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "\/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi )/d; + / ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "\/var\/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )/,+1 d'\ + Makefile.{am,in} + + ./configure --prefix=/usr\ + --enable-crashtrace=no\ + --enable-debug=no\ + --enable-mmap=yes\ + --sysconfdir=/etc\ + --with-cgidir=/srv/http/cgi-bin\ + --with-extralibs='-L/usr/lib -L/usr/lib/mysql'\ + --with-ffmpeg=/usr\ + --with-libarch=lib\ + --with-mysql=/usr\ + --with-webdir=/srv/http/$pkgname\ + --with-webgroup=http\ + --with-webhost=localhost\ --with-webuser=http + make V=0 } package() { cd $srcdir/ZoneMinder-$pkgver - make DESTDIR=$pkgdir \ - ZM_LOGDIR=$pkgdir/var/log/zm \ - ZM_RUNDIR=$pkgdir/run \ - ZM_TMPDIR=$pkgdir/tmp \ - install + make DESTDIR=$pkgdir RUNDIR=$pkdir/run ZM_RUNDIR=$pkgdir/run install - rmdir $pkgdir/run - rmdir $pkgdir/tmp + mkdir -p $pkgdir/{etc/{httpd/conf/extra,rc.d},srv/http/{cgi-bin,$pkgname},usr/{lib/systemd/system,share/{license/$pkgname,$pkgname/db}},var/{cache/$pkgname,log/$pkgname}} - mkdir -p $pkgdir/etc/httpd/conf/extra - mkdir -p $pkgdir/etc/rc.d - mkdir -p $pkgdir/usr/lib/systemd/system - mkdir -p $pkgdir/usr/share/license/$pkgname - mkdir -p $pkgdir/usr/share/$pkgname/db - mkdir -p $pkgdir/var/cache/$pkgname + chown -R http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/$pkgname}} for i in events images temp; do - mv $pkgdir/usr/share/$pkgname/$i $pkgdir/var/cache/$pkgname/$i - ln -s /var/cache/$pkgname/$i $pkgdir/usr/share/$pkgname/$i + mv $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i + ln -s /var/cache/$pkgname/$i $pkgdir/srv/http/$pkgname/$i done - ln -s /usr/lib/$pkgname/cgi-bin $pkgdir/usr/share/$pkgname - ln -s /usr/share/cambozola/cambozola.jar $pkgdir/usr/share/$pkgname - - chown http.http $pkgdir/etc/zm.conf - chown -R http.http $pkgdir/var/cache/$pkgname - chown http.http $pkgdir/var/log/zm + ln -s /srv/http/cgi-bin $pkgdir/srv/http/$pkgname + ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname install -D -m 644 $srcdir/httpd-zm.conf $pkgdir/etc/httpd/conf/extra - install -D -m 644 $srcdir/zm.rc.d $pkgdir/etc/rc.d/zm + install -D -m 644 $srcdir/zm.rc.d $pkgdir/etc/rc.d/${pkgname}d install -D -m 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system install -D -m 644 COPYING $pkgdir/usr/share/license/$pkgname install -D -m 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db diff --git a/pcr/zoneminder/httpd-zm.conf b/pcr/zoneminder/httpd-zm.conf index e48ea9fc6..aeb089bc1 100644 --- a/pcr/zoneminder/httpd-zm.conf +++ b/pcr/zoneminder/httpd-zm.conf @@ -1,20 +1,20 @@ # /etc/httpd/conf/extra/httpd-zm.conf # Config for zoneminder web app -Alias /zm "/usr/share/zoneminder" -<Directory "/usr/share/zoneminder"> +Alias /zm "/srv/http/zoneminder" +<Directory "/srv/http/zoneminder"> Options -Indexes MultiViews FollowSymLinks - AllowOverride All + AllowOverride None Order allow,deny Allow from all # The code unfortunately uses short tags in many places - php_value short_open_tag 1 + php_value short_open_tag On </Directory> -ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" -<Directory "/usr/lib/zoneminder/cgi-bin"> - AllowOverride All - Options ExecCGI - Order allow,deny - Allow from all +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/patch-ffmpeg-configure.patch b/pcr/zoneminder/patch-ffmpeg-configure.patch new file mode 100644 index 000000000..ba1674a4a --- /dev/null +++ b/pcr/zoneminder/patch-ffmpeg-configure.patch @@ -0,0 +1,26 @@ +--- configure.old 2011-08-23 12:10:37.000000000 -0300 ++++ configure 2012-09-26 16:23:33.211940267 -0300 +@@ -3026,8 +3026,8 @@ + fi + + +-FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}" +-FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include" ++FFMPEG_LIBS=`pkg-config --cflags libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale` ++FFMPEG_CFLAGS=`pkg-config --cflags libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale` + + + +--- configure.ac.old 2011-08-23 12:10:32.000000000 -0300 ++++ configure.ac 2012-09-26 18:16:44.146848335 -0300 +@@ -88,8 +88,8 @@ + e.g. --with-ffmpeg=/usr/local]) + ) + AC_SUBST(FFMPEG_PREFIX) +-FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}" +-FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include" ++FFMPEG_LIBS=`pkg-config --libs libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale` ++FFMPEG_CFLAGS=`pkg-config --libs libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale` + AC_SUBST(FFMPEG_LIBS) + AC_SUBST(FFMPEG_CFLAGS) + diff --git a/pcr/zoneminder/zoneminder.install b/pcr/zoneminder/zoneminder.install index 3ade5355e..5e62cc23e 100644 --- a/pcr/zoneminder/zoneminder.install +++ b/pcr/zoneminder/zoneminder.install @@ -1,14 +1,14 @@ pre_install() { set -e abort=false - if [ -L /usr/share/zoneminder/events ]; then - l=$(readlink /usr/share/zoneminder/events) + 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 /usr/share/zoneminder/images ]; then - l=$(readlink /usr/share/zoneminder/images ) + if [ -L /srv/http/zoneminder/images ]; then + l=$(readlink /srv/http/zoneminder/images ) if [ $l != /var/cache/zoneminder/images ]; then abort=true fi @@ -16,7 +16,7 @@ pre_install() { if [ $abort = true ]; then cat >&2 << EOF Aborting installation of zoneminder due to non-default symlinks in -/usr/share/zoneminder for the images and/or events directory, which could +/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 @@ -26,18 +26,21 @@ EOF } post_install() { - mkdir /usr/share/zoneminder/backup - mkdir /usr/share/zoneminder/socks + if [ -d /var/log/zoneminder ]; then + mkdir -m 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + else + chmod 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + fi cat << EOF Note: ==> To run Zoneminder, you must install the database running mysql service (as root): ==> "rc.d start mysqld" (in initscripts) or "systemctl start mysqld.service" (in systemd) ==> and add Zoneminder database typing: -==> 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" +==> "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" Note: ==> You must uncomment that line in /etc/php/php.ini: @@ -50,28 +53,40 @@ Note: ==> "extension=session.so" ==> "extension=sockets.so" -==> Check /etc/php/php.ini and make sure short_open_tag = On -==> or ZoneMinder will not work. - ==> You must edit /etc/php/php.ini and add to open_basedir "/etc" and ==> "/usr/share/zoneminder" like so -==> open_basedir = /home:/tmp:/usr/share/pear:/etc:/usr/share/zoneminder +==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder" ==> Otherwise ZoneMinder will be unable to read /etc/zm.conf ==> or display its own web directory +==> And set your timezone in php.ini: date.timezone = <my_country>/<my_city> Note: ==> You must edit /etc/httpd/conf/httpd.conf and add the line: -==> LoadModule php5_module modules/libphp5.so +==> "LoadModule php5_module modules/libphp5.so" ==> and: -==> Include /etc/httpd/conf/extra/httpd-zm.conf +==> "Include /etc/httpd/conf/extra/php5_module.conf" +==> "Include /etc/httpd/conf/extra/httpd-zm.conf" EOF } post_upgrade() { /usr/bin/zmupdate.pl -f >/dev/null + if [ -d /var/log/zoneminder ]; then + mkdir -m 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + else + chmod 0755 /var/log/zoneminder + chown http.http /var/log/zoneminder + fi } post_remove() { + if [ -d /run/zoneminder ]; then + rm -vr /run/zoneminder + fi + if [ -d /tmp/zoneminder ]; then + rm -vr /tmp/zoneminder + fi cat << EOF Note: ==> To clean Zoneminder mysql database, run as root: @@ -82,6 +97,9 @@ Note: ==> 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 ==> "Include /etc/httpd/conf/extra/httpd-zm.conf" ==> Disable php with mysql if it isn't needed with others servers, @@ -93,8 +111,13 @@ Note: ==> "extension=mysqli.so" ==> "extension=session.so" ==> "extension=sockets.so" +==> "date.timezone = <my_country>/<my_city>" -==> edit /etc/php/php.ini and remove "/etc" and "/usr/share/zoneminder" +==> Edit /etc/php/php.ini and remove "/etc" and "/usr/share/zoneminder/www" ==> 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 } |