wok-next annotate coreutils/receipt @ rev 20678

Up clisp (2.50)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 15 02:59:03 2018 +0300 (2018-05-15)
parents 4550df96633d
children 49a10d2a7814
rev   line source
al@19735 1 # SliTaz package receipt v2.
pankso@15 2
pankso@15 3 PACKAGE="coreutils"
al@20436 4 VERSION="8.29"
al@19561 5 CATEGORY="meta"
al@19735 6 SHORT_DESC="Utilities for using and setting the basic system"
pankso@15 7 MAINTAINER="pankso@slitaz.org"
pascal@14999 8 LICENSE="GPL3"
al@19215 9 WEB_SITE="https://www.gnu.org/software/coreutils/coreutils.html"
al@20436 10 LFS="http://www.linuxfromscratch.org/lfs/view/stable/chapter05/coreutils.html"
al@19561 11
slaxemulator@7244 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
al@19215 13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pascal@14074 14
al@20436 15 BUILD_DEPENDS="automake autoconf gettext xz libcap-dev gmp-dev patch texinfo \
al@20436 16 openssl-dev"
al@20436 17 SPLIT="\
al@20436 18 coreutils-character coreutils-command coreutils-conditions \
al@20436 19 coreutils-context-system coreutils-context-user coreutils-context-working \
al@20436 20 coreutils-directory coreutils-disk coreutils-file-attributes \
al@20436 21 coreutils-file-format coreutils-file-output-full coreutils-file-output-part \
al@20436 22 coreutils-file-sort coreutils-file-special coreutils-file-summarize \
al@20436 23 coreutils-line coreutils-numeric coreutils-operations \
al@20436 24 coreutils-path coreutils-print coreutils-redirection \
al@20436 25 coreutils-multicall:multi"
pankso@15 26
al@20436 27 compile_rules() {
al@20436 28 case $SET in
al@20436 29 multi) SET_ARGS='--enable-single-binary=symlinks';;
al@20436 30 *) SET_ARGS='';;
al@20436 31 esac
al@19735 32 # Rebuild fixed translations
al@19561 33 msgfmt po/nb.po -o po/nb.gmo
al@19561 34 msgfmt po/sl.po -o po/sl.gmo
rcx@3574 35
al@19215 36 autoreconf -fi
pankso@4080 37
al@20436 38 FORCE_UNSAFE_CONFIGURE=1 \
al@20436 39 ./configure \
al@20436 40 --with-openssl \
al@20436 41 $SET_ARGS \
al@20436 42 $CONFIGURE_ARGS &&
al@20436 43 make && make install || return 1
pankso@4080 44
al@19215 45 # LFS: Move programs to the locations specified by the FHS
al@19215 46 mkdir -p \
al@19215 47 $install/bin \
al@19215 48 $install/usr/sbin \
al@19215 49 $install/usr/share/man/man8
al@20436 50
al@20436 51 while read from to; do
al@20436 52 case $SET in
al@20436 53 multi)
al@20436 54 rm $install$from
al@20436 55 # make relative symlinks
al@20436 56 case $to in
al@20436 57 /bin/*) ln -s ../../usr/bin/coreutils $install$to;;
al@20436 58 *) ln -s ../bin/coreutils $install$to;;
al@20436 59 esac
al@20436 60 ;;
al@20436 61 *)
al@20436 62 mv $install$from $install$to
al@20436 63 ;;
al@20436 64 esac
al@20436 65 done <<EOT
al@20436 66 /usr/bin/cat /bin/cat
al@20436 67 /usr/bin/chgrp /bin/chgrp
al@20436 68 /usr/bin/chmod /bin/chmod
al@20436 69 /usr/bin/chown /bin/chown
al@20436 70 /usr/bin/cp /bin/cp
al@20436 71 /usr/bin/date /bin/date
al@20436 72 /usr/bin/dd /bin/dd
al@20436 73 /usr/bin/df /bin/df
al@20436 74 /usr/bin/echo /bin/echo
al@20436 75 /usr/bin/false /bin/false
al@20436 76 /usr/bin/kill /bin/kill
al@20436 77 /usr/bin/ln /bin/ln
al@20436 78 /usr/bin/ls /bin/ls
al@20436 79 /usr/bin/mkdir /bin/mkdir
al@20436 80 /usr/bin/mknod /bin/mknod
al@20436 81 /usr/bin/mv /bin/mv
al@20436 82 /usr/bin/pwd /bin/pwd
al@20436 83 /usr/bin/rm /bin/rm
al@20436 84 /usr/bin/rmdir /bin/rmdir
al@20436 85 /usr/bin/stty /bin/stty
al@20436 86 /usr/bin/sync /bin/sync
al@20436 87 /usr/bin/true /bin/true
al@20436 88 /usr/bin/uname /bin/uname
al@20436 89 /usr/bin/chroot /usr/sbin/chroot
al@20436 90 EOT
al@19215 91 mv $install/usr/share/man/man1/chroot.1 \
al@19215 92 $install/usr/share/man/man8/chroot.8
al@19215 93 sed -i 's|"1"|"8"|' $install/usr/share/man/man8/chroot.8
pankso@15 94 }
al@19735 95
al@20436 96 genpkg_rules() {
al@20436 97 DEPENDS="glibc-base" # default
al@19735 98 case $PACKAGE in
al@19735 99 coreutils)
al@20436 100 DEPENDS=${SPLIT/coreutils-multicall:multi} # all but coreutils-multicall
al@20436 101 TAGS="LFS"
al@20436 102 ;;
al@20436 103 *-character)
al@19735 104 copy expand tr unexpand
al@19735 105 CAT="system-tools|operate on characters"
al@20436 106 ;;
al@20436 107 *-command)
al@19735 108 copy env kill nice nohup sleep stdbuf timeout libstdbuf.so chroot
al@19735 109 CAT="system-tools|commands"
al@20436 110 ;;
al@20436 111 *-conditions)
al@19735 112 copy false true [ expr test
al@19735 113 CAT="system-tools|conditions"
al@19735 114 DEPENDS="glibc-base gmp" ;;
al@20436 115 *-context-system)
al@19735 116 copy date uname chcon hostid nproc runcon uptime
al@19735 117 CAT="system-tools|system context"
al@20436 118 ;;
al@20436 119 *-context-user)
al@19735 120 copy groups id logname pinky users who whoami
al@19735 121 CAT="system-tools|user context"
al@20436 122 ;;
al@20436 123 *-context-working)
al@19735 124 copy pwd stty printenv tty
al@19735 125 CAT="system-tools|working context"
al@20436 126 ;;
al@20436 127 *-directory)
al@19735 128 copy ls dir dircolors vdir
al@19735 129 CAT="system-tools|list directories"
al@20436 130 DEPENDS="glibc-base libcap" ;;
al@20436 131 *-disk)
al@19735 132 copy df sync du stat truncate
al@19735 133 CAT="system-tools|work with disks"
al@20436 134 ;;
al@20436 135 *-file-attributes)
al@19735 136 copy chgrp chmod chown touch
al@19735 137 CAT="system-tools|change file attributes"
al@20436 138 ;;
al@20436 139 *-file-format)
al@19735 140 copy fmt fold pr
al@19735 141 CAT="system-tools|format file contents"
al@20436 142 ;;
al@20436 143 *-file-output-full)
al@19735 144 copy cat base32 base64 nl od tac
al@19735 145 CAT="system-tools|output entire files"
al@20436 146 ;;
al@20436 147 *-file-output-part)
al@19735 148 copy csplit head split tail
al@19735 149 CAT="system-tools|output file parts"
al@20436 150 ;;
al@20436 151 *-file-sort)
al@19735 152 copy comm ptx shuf sort tsort uniq
al@19735 153 CAT="system-tools|operate on sorted files"
al@20436 154 DEPENDS="glibc-base openssl" # openssl for `sort`
al@20436 155 ;;
al@20436 156 *-file-special)
al@19735 157 copy ln mkdir mknod rmdir link mkfifo mktemp readlink realpath unlink
al@19735 158 CAT="system-tools|work with special file types"
al@20436 159 ;;
al@20436 160 *-file-summarize)
al@20436 161 copy b2sum cksum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum sum wc
al@19735 162 CAT="system-tools|summarize files"
al@20436 163 DEPENDS="glibc-base openssl"
al@20436 164 ;;
al@20436 165 *-line)
al@19735 166 copy cut join paste
al@19735 167 CAT="system-tools|operate on fields within a line"
al@20436 168 ;;
al@20436 169 *-numeric)
al@19735 170 copy factor seq
al@19735 171 CAT="system-tools|numeric"
al@19735 172 DEPENDS="glibc-base gmp" ;;
al@20436 173 *-operations)
al@19735 174 copy cp dd mv install rm shred
al@19735 175 CAT="system-tools|perform basic operations"
al@19735 176 DEPENDS="glibc-base acl attr" ;;
al@20436 177 *-path)
al@19735 178 copy basename dirname pathchk
al@19735 179 CAT="system-tools|perform path manipulation"
al@20436 180 ;;
al@20436 181 *-print)
al@19735 182 copy echo numfmt printf yes
al@19735 183 CAT="system-tools|print text"
al@20436 184 ;;
al@20436 185 *-redirection)
al@19735 186 copy tee
al@19735 187 CAT="system-tools|redirection"
al@20436 188 ;;
al@20436 189 *-multicall)
al@20436 190 copy @std
al@20436 191 CAT="system-tools|packed in single binary like Busybox"
al@20436 192 DEPENDS="glibc-base acl attr gmp libcap openssl"
al@20436 193 ;;
al@19735 194 esac
al@19735 195 }
al@19735 196
al@19735 197 # Remove Busybox applets in order to not clash with ("/bin", "/sbin",
al@19735 198 # "/usr/bin" and "/usr/sbin" conflicts with the same filename)
al@20436 199
al@20436 200 # for /usr/bin/nice /usr/bin/sleep
al@20436 201 post_install_coreutils_command() {
al@20436 202 for i in nice sleep; do
al@20436 203 readlink "$1/bin/$i" | grep -q busybox && rm "$1/bin/$i"
al@20436 204 done
al@20436 205 :
al@19735 206 }
al@20436 207 # for /usr/bin/printenv
al@20436 208 post_install_coreutils_context_working() {
al@20436 209 readlink "$1/bin/printenv" | grep -q busybox && rm "$1/bin/printenv"
al@20436 210 :
al@19735 211 }
al@20436 212 # for /usr/bin/stat
al@20436 213 post_install_coreutils_disk() {
al@20436 214 readlink "$1/bin/stat" | grep -q busybox && rm "$1/bin/stat"
al@20436 215 :
al@19735 216 }
al@20436 217 # for /usr/bin/touch
al@20436 218 post_install_coreutils_file_attributes() {
al@20436 219 readlink "$1/bin/touch" | grep -q busybox && rm "$1/bin/touch"
al@20436 220 :
al@19735 221 }
al@20436 222 # for /usr/bin/base64
al@20436 223 post_install_coreutils_file_output_full() {
al@20436 224 readlink "$1/bin/base64" | grep -q busybox && rm "$1/bin/base64"
al@20436 225 :
al@19735 226 }
al@20436 227 # for /usr/bin/mktemp
al@20436 228 post_install_coreutils_file_special() {
al@20436 229 readlink "$1/bin/mktemp" | grep -q busybox && rm "$1/bin/mktemp"
al@20436 230 :
al@19735 231 }
al@20436 232 # for /usr/bin/base64 /usr/bin/mktemp /usr/bin/nice /usr/bin/printenv
al@20436 233 # /usr/bin/sleep /usr/bin/stat /usr/bin/touch
al@20436 234 post_install_coreutils_multicall() {
al@20436 235 for i in base64 mktemp nice printenv sleep stat touch; do
al@20436 236 readlink "$1/bin/$i" | grep -q busybox && rm "$1/bin/$i"
al@20436 237 done
al@20436 238 :
al@20436 239 }