wok-next diff partimage/receipt @ rev 20712
libtorrent: fix rtorrent building for non-64bit archs
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun May 27 12:13:53 2018 +0300 (2018-05-27) |
parents | d3adbeea3a9f |
children | 599c2faa5148 |
line diff
1.1 --- a/partimage/receipt Wed Nov 08 19:39:57 2017 +0200 1.2 +++ b/partimage/receipt Sun May 27 12:13:53 2018 +0300 1.3 @@ -11,115 +11,74 @@ 1.4 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.5 1.6 BUILD_DEPENDS="newt newt-dev slang-dev bzip2-dev openssl-dev zlib-dev pam-dev" 1.7 -SPLIT="partimage partimage-pam" 1.8 +SPLIT="partimage partimage-pam:pam" 1.9 1.10 -# Rules to configure and make the package. 1.11 -compile_rules() 1.12 -{ 1.13 +compile_rules() { 1.14 + case $SET in 1.15 + '') SET_ARGS='--disable-pam';; 1.16 + pam) SET_ARGS='--enable-pam';; 1.17 + esac 1.18 + 1.19 sed -i 's/gzFile \*m_gzImageFile/gzFile m_gzImageFile/' src/client/imagefile.h 1.20 sed -i 's/(gzFile \*) gzdopen/gzdopen/' src/client/imagefile.cpp 1.21 1.22 - cp -a $src $src-pam 1.23 - 1.24 ./configure \ 1.25 - --prefix=/usr \ 1.26 - --disable-pam \ 1.27 - --sysconfdir=/etc \ 1.28 - --infodir=/usr/share/info \ 1.29 - --mandir=/usr/share/man $CONFIGURE_ARGS && 1.30 + $SET_ARGS \ 1.31 + $CONFIGURE_ARGS && 1.32 make && 1.33 make DESTDIR=$DESTDIR install || return 1 1.34 1.35 - cd $src-pam 1.36 - ./configure \ 1.37 - --prefix=/usr \ 1.38 - --enable-pam \ 1.39 - --sysconfdir=/etc \ 1.40 - --infodir=/usr/share/info \ 1.41 - --mandir=/usr/share/man $CONFIGURE_ARGS && 1.42 - make && 1.43 - make DESTDIR=$DESTDIR-pam install 1.44 + install -Dm600 $stuff/etc/partimaged/partimaged.cert $install/etc/partimaged/partimaged.cert 1.45 + install -Dm600 $stuff/etc/partimaged/partimaged.key $install/etc/partimaged/partimaged.key 1.46 + install -Dm755 $stuff/etc/init.d/partimaged $install/etc/init.d/partimaged 1.47 + 1.48 + mkdir -p $install/var/lib/partimaged/ 1.49 } 1.50 1.51 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.52 -genpkg_rules() 1.53 -{ 1.54 +genpkg_rules() { 1.55 case $PACKAGE in 1.56 - partimage) 1.57 - DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" 1.58 - mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged 1.59 - cp -a $install/usr/sbin $fs/usr 1.60 - cp -a $install/etc $fs/ 1.61 - install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged 1.62 - install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d 1.63 - ;; 1.64 - partimage-pam) 1.65 - CAT="system-tools|using PAM" 1.66 - PROVIDE="partimage:pam" 1.67 - DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base" 1.68 - mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/partimaged 1.69 - cp -a $install-pam/usr/sbin $fs/usr 1.70 - cp -a $install-pam/etc $fs/ 1.71 - install -g root -o root -m 0600 stuff/etc/partimaged/partimaged.* $fs/etc/partimaged 1.72 - install -g root -o root -m 0755 stuff/etc/init.d/partimaged $fs/etc/init.d 1.73 - ;; 1.74 + partimage) 1.75 + copy @std 1.76 + DEPENDS="newt bzip2 openssl slitaz-base-files zlib gcc-lib-base" 1.77 + ;; 1.78 + partimage-pam) 1.79 + copy @std 1.80 + CAT="system-tools|using PAM" 1.81 + PROVIDE="partimage:pam" 1.82 + DEPENDS="newt bzip2 openssl slitaz-base-files zlib pam gcc-lib-base" 1.83 + ;; 1.84 esac 1.85 } 1.86 1.87 -post_install_partimage() 1.88 -{ 1.89 - echo 1.90 - echo "Adding user/group partimag..." 1.91 +# The same post-install/remove rules for both PAM/non-PAM packages 1.92 + 1.93 +post_install() { 1.94 + # Adding user/group partimag... 1.95 chroot "$1/" adduser -S -H -D partimag 1.96 1.97 - echo "Setting permissions for config files" 1.98 + # Setting permissions for config files 1.99 chmod 0600 "$1"/etc/partimaged/* 1.100 - chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/* 1.101 + chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/* 1.102 1.103 - echo "Creating image files directory" 1.104 + # Creating image files directory 1.105 chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged" 1.106 1.107 - echo "" 1.108 - echo -e "\nTo starts partimage server you can run :\n" 1.109 - echo "/etc/init.d/partimaged start" 1.110 - echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" 1.111 + [ -n "$quiet" ] || cat <<EOT 1.112 + 1.113 + .---------------------------------------------------. 1.114 + | To starts partimage server you can run: | 1.115 + | /etc/init.d/partimaged start | 1.116 + | | 1.117 + | Or add partimaged to RUN_DAEMONS in /etc/rcS.conf | 1.118 + '---------------------------------------------------' 1.119 +EOT 1.120 } 1.121 1.122 -post_remove_partimage() 1.123 -{ 1.124 - chroot "$1/" deluser partimag 1.125 +post_remove() { 1.126 + chroot "$1/" deluser partimag 1.127 chroot "$1/" delgroup partimag 1.128 1.129 if [ -f "$1/etc/paritimaged" ]; then 1.130 rm -rf "$1/etc/partimaged" 1.131 fi 1.132 } 1.133 - 1.134 -post_install_partimage_pam() 1.135 -{ 1.136 - echo 1.137 - echo "Adding user/group partimag..." 1.138 - chroot "$1/" adduser -S -H -D partimag 1.139 - 1.140 - echo "Setting permissions for config files" 1.141 - chmod 0600 "$1"/etc/partimaged/* 1.142 - chroot "$1/" chown partimag.partimag "$1"/etc/partimaged/* 1.143 - 1.144 - echo "Creating image files directory" 1.145 - chroot "$1/" install -g partimag -o partimag -m 0755 -d "$1/var/lib/partimaged" 1.146 - 1.147 - echo "" 1.148 - echo -e "\nTo starts partimage server you can run :\n" 1.149 - echo "/etc/init.d/partimaged start" 1.150 - echo -e "Or add partimaged to RUN_DAEMONS in /etc/rcS.conf\n" 1.151 -} 1.152 - 1.153 -post_remove_partimage_pam() 1.154 -{ 1.155 - chroot "$1/" deluser partimag 1.156 - chroot "$1/" delgroup partimag 1.157 - 1.158 - if [ -f "$1/etc/paritimaged" ]; then 1.159 - rm -rf "$1/etc/partimaged" 1.160 - fi 1.161 -}