wok annotate phpeasyvcs/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (2022-05-21)
parents 9e01bc6321ea
children 8c3395ca87eb
rev   line source
pascal@13591 1 # SliTaz package receipt.
pascal@13591 2
pascal@13591 3 PACKAGE="phpeasyvcs"
pascal@13591 4 SOURCE="phpEasyVCS"
pascal@13591 5 VERSION="1.0"
pascal@13591 6 CATEGORY="network"
pascal@13591 7 SHORT_DESC="A simple version control system (VCS) and WebDAV server."
pascal@13591 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15198 9 LICENSE="GPL3"
pascal@13591 10 WEB_SITE="http://phpeasyvcs.sourceforge.net/"
pascal@13591 11 TARBALL="$SOURCE-$VERSION.zip"
pascal@13591 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@15198 13
pascal@13591 14 DEPENDS="php"
pascal@13591 15
pascal@24102 16 current_version()
pascal@24102 17 {
pascal@24102 18 wget -O - https://sourceforge.net/projects/phpeasyvcs/files/ 2>/dev/null | \
pascal@24102 19 sed '/Click to/!d;/phpEasyVCS/!d;s|.*phpEasyVCS-||;s|.zip.*||;q'
pascal@24102 20 }
pascal@24102 21
pascal@13591 22 # Rules to configure and make the package.
pascal@13591 23 compile_rules()
pascal@13591 24 {
pascal@13591 25 cd $src
pascal@13591 26 }
pascal@13591 27
pascal@13591 28 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@13591 29 genpkg_rules()
pascal@13591 30 {
pascal@13591 31 mkdir -p $fs/usr/share
pascal@13591 32 cp -a $src $fs/usr/share/phpeasyvcs
pascal@13591 33 }
pascal@13591 34
pascal@13591 35 post_install()
pascal@13591 36 {
pascal@13591 37 # Configure lighttpd server
pascal@18730 38 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 39 if ! grep -q /usr/share/phpeasyvcs/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 40 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpeasyvcs/" => "/usr/share/phpeasyvcs/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
pascal@13591 41 if [ -z "$1" ]; then
pascal@13591 42 # Start Web server.
pascal@13591 43 /etc/init.d/lighttpd stop
pascal@13591 44 /etc/init.d/lighttpd start
pascal@13591 45 fi
pascal@13591 46 fi
pascal@13591 47 fi
pascal@13591 48 # Configure apache server
pascal@18730 49 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 50 if [ ! -f "$1/etc/apache/conf.d/phpeasyvcs" ]; then
pascal@18730 51 cat > "$1/etc/apache/conf.d/phpeasyvcs" <<EOT
pascal@13591 52 <IfModule mod_alias.c>
pascal@13591 53 Alias /phpeasyvcs /usr/share/phpeasyvcs
pascal@13591 54 </IfModule>
pascal@13591 55 <Directory /usr/share/phpeasyvcs/>
pascal@13591 56 DirectoryIndex index.php
pascal@13591 57 Options +FollowSymLinks
pascal@13591 58 AllowOverride None
pascal@13591 59 Order allow,deny
pascal@13591 60 Allow from all
pascal@13591 61 </Directory>
pascal@13591 62 EOT
pascal@13591 63 if [ -z "$1" ]; then
pascal@13591 64 # Start Web server.
pascal@13591 65 /etc/init.d/apache stop
pascal@13591 66 /etc/init.d/apache start
pascal@13591 67 fi
pascal@13591 68 fi
pascal@13591 69 fi
pascal@13591 70 }