[fe30c61] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | # $Id$
|
---|
| 4 |
|
---|
| 5 | #=== MAKEFILE HEADER ===
|
---|
| 6 |
|
---|
[195ed9f] | 7 | #----------------------------------#
|
---|
| 8 | wrt_Makefile_header() { #
|
---|
| 9 | #----------------------------------#
|
---|
| 10 | (
|
---|
| 11 | cat << EOF
|
---|
| 12 | # This file is automatically generated by jhalfs
|
---|
[fe30c61] | 13 | # DO NOT EDIT THIS FILE MANUALLY
|
---|
| 14 | #
|
---|
[195ed9f] | 15 | # Generated on `date "+%F %X %Z"`
|
---|
| 16 |
|
---|
[aec4483] | 17 |
|
---|
| 18 | SHELL = /bin/bash
|
---|
[195ed9f] | 19 |
|
---|
| 20 | SRC = /sources
|
---|
| 21 | MOUNT_PT = $BUILDDIR
|
---|
| 22 | PKG_LST = $PKG_LST
|
---|
| 23 | LUSER = $LUSER
|
---|
| 24 | LGROUP = $LGROUP
|
---|
[962793a] | 25 | LHOME = $LHOME
|
---|
[195ed9f] | 26 | SCRIPT_ROOT = $SCRIPT_ROOT
|
---|
| 27 |
|
---|
| 28 | BASEDIR = \$(MOUNT_PT)
|
---|
| 29 | SRCSDIR = \$(BASEDIR)/sources
|
---|
| 30 | CMDSDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$PROGNAME-commands
|
---|
[93346ee] | 31 | LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$LOGDIRBASE
|
---|
| 32 | TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
|
---|
[195ed9f] | 33 |
|
---|
| 34 | crCMDSDIR = /\$(SCRIPT_ROOT)/$PROGNAME-commands
|
---|
[93346ee] | 35 | crLOGDIR = /\$(SCRIPT_ROOT)/$LOGDIRBASE
|
---|
| 36 | crTESTLOGDIR = /\$(SCRIPT_ROOT)/$TESTLOGDIRBASE
|
---|
| 37 | crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE
|
---|
[195ed9f] | 38 |
|
---|
[0835a10] | 39 | SU_LUSER = sudo -H -u \$(LUSER) sh -c
|
---|
[962793a] | 40 | LUSER_HOME = \$(LHOME)/\$(LUSER)
|
---|
[195ed9f] | 41 | PRT_DU = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
|
---|
[9bbb9c8] | 42 | PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found --exclude /var/lib / \`\n"
|
---|
[195ed9f] | 43 |
|
---|
[3e7ceed] | 44 | ADD_REPORT = $REPORT
|
---|
| 45 | ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
|
---|
| 46 | ADD_BLFS_TOOLS = $BLFS_TOOL
|
---|
[7072e1f] | 47 | PKGMNGT = $PKGMNGT
|
---|
[322226d] | 48 | WRAP_INSTALL = $WRAP_INSTALL
|
---|
[1838bc7] | 49 |
|
---|
| 50 |
|
---|
[195ed9f] | 51 | export PATH := \${PATH}:/usr/sbin
|
---|
| 52 |
|
---|
| 53 | include makefile-functions
|
---|
| 54 |
|
---|
| 55 | EOF
|
---|
| 56 | ) > $MKFILE
|
---|
| 57 | }
|
---|
[fe30c61] | 58 |
|
---|
| 59 | #=======================
|
---|
| 60 |
|
---|
| 61 |
|
---|
[3cb4ef5b] | 62 | #==== PACKAGES NAMES AND VERSIONS ====
|
---|
[fe30c61] | 63 |
|
---|
| 64 | #----------------------------------#
|
---|
| 65 | get_package_tarball_name() { #
|
---|
| 66 | #----------------------------------#
|
---|
[3ac3ae1] | 67 | local script_name=`echo ${1} | sed -e 's@^[0-9]\{2\}-@@'`
|
---|
[fe30c61] | 68 |
|
---|
| 69 | # The use of 'head' is necessary to limit the return value to the FIRST match..
|
---|
| 70 | # hopefully this will not cause problems.
|
---|
| 71 | #
|
---|
| 72 | case $script_name in
|
---|
| 73 | tcl) echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 74 | ;;
|
---|
[608fbe1] | 75 | iputils) echo $(grep "^iputils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 76 | ;;
|
---|
[7214dad] | 77 | powerpc-utils) echo $(grep "^powerpc-utils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 78 | ;;
|
---|
[3c38ab0] | 79 | uClibc)
|
---|
| 80 | if [[ "${PROGNAME}" = "clfs3" ]]; then
|
---|
| 81 | echo $(grep "^uClibc-" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[7214dad] | 82 | else
|
---|
[3c38ab0] | 83 | echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[7214dad] | 84 | fi
|
---|
| 85 | ;;
|
---|
[fe30c61] | 86 | linux-headers)
|
---|
[31a37db] | 87 | if [[ "${PROGNAME}" = "lfs" ]] || [[ "${PROGNAME}" = "hlfs" ]] || [[ "${PROGNAME}" = "clfs" ]]; then
|
---|
[fe30c61] | 88 | # Uses kernel headers directly
|
---|
| 89 | echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 90 | else
|
---|
[608fbe1] | 91 | # CLFS{2,3} used to use massaged headers package
|
---|
| 92 | # echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 93 | echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[fe30c61] | 94 | fi
|
---|
| 95 | ;;
|
---|
[d8006a00] | 96 | expect) echo $(grep "^expect" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 97 | ;;
|
---|
[608fbe1] | 98 | e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 99 | ;;
|
---|
[f0a31de] | 100 | libcap) echo $(grep "^libcap" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 101 | ;;
|
---|
[82808d1] | 102 | util-linux-libs | util-linux-pass1) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[608fbe1] | 103 | ;;
|
---|
[4b54394] | 104 | xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[083e2fd] | 105 | ;;
|
---|
[7072e1f] | 106 | sqlite) echo $(grep "^sqlite" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[083e2fd] | 107 | ;;
|
---|
| 108 | udev) echo $(grep "^systemd" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 109 | ;;
|
---|
[8099885] | 110 | xml-parser) echo $(grep "^XML" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 111 | ;;
|
---|
| 112 | libdbus) echo $(grep "^dbus" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
| 113 | ;;
|
---|
[203a64c] | 114 | glibc) echo $(grep "^glibc" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[5637b53] | 115 | ;;
|
---|
| 116 | libelf) echo $(grep "^elfutils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[203a64c] | 117 | ;;
|
---|
[7072e1f] | 118 | *) echo $(grep "^$script_name[_-][[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
---|
[fe30c61] | 119 | ;;
|
---|
| 120 | esac
|
---|
| 121 |
|
---|
| 122 | }
|
---|
| 123 |
|
---|
[3cb4ef5b] | 124 | #----------------------------------#
|
---|
| 125 | get_package_version() { #
|
---|
| 126 | #----------------------------------#
|
---|
| 127 | # Those hacks may change depending on the invention of devs for tarball names.
|
---|
| 128 | # Normally, we expect -digit to signal the beginning of the version field
|
---|
| 129 | # but it may happen that there is no '-' (tcl, expect), that the version
|
---|
| 130 | # field is ddd-d (pkg-config-lite-028-1, since sed is greedy, it finds only
|
---|
| 131 | # the second dash) or that the first character of the version is not a digit
|
---|
| 132 | # (iputils-s20121221)...
|
---|
| 133 | case ${1} in
|
---|
| 134 | tcl*|expect*|tzdata*|xmlts*|unzip*|lynx*)
|
---|
| 135 | echo ${1} | sed -e 's@^[^[:digit:]]*@@' \
|
---|
| 136 | -e 's@\(-src\)*\.tar.*@@'
|
---|
| 137 | ;;
|
---|
| 138 | iputils*) echo ${1} | sed -e 's@^.*-@@' \
|
---|
| 139 | -e 's@\.tar.*@@'
|
---|
| 140 | ;;
|
---|
[203a64c] | 141 | glibc*) echo ${1} | sed -e 's@^[^-]*-@@' \
|
---|
| 142 | -e 's@\.tar.*@@'
|
---|
| 143 | ;;
|
---|
[3cb4ef5b] | 144 | LVM*) echo ${1} | sed -e 's@^[^.]*\.@@' \
|
---|
| 145 | -e 's@\.tgz.*@@'
|
---|
| 146 | ;;
|
---|
| 147 | iproute*) echo ${1} | sed -e 's@^[^-]*-@@' \
|
---|
| 148 | -e 's@\.tar.*@@'
|
---|
| 149 | ;;
|
---|
[3d96a65] | 150 | pkg*|udev*|Singular*|XML*)
|
---|
[3cb4ef5b] | 151 | echo ${1} | sed -e 's@^.*[a-z]-\([[:digit:]]\)@\1@' \
|
---|
| 152 | -e 's@\.tar.*@@' \
|
---|
| 153 | -e 's@\.zip.*@@'
|
---|
| 154 | ;;
|
---|
| 155 | *) echo ${1} | sed -e 's@^.*[-_]\([[:digit:]]\)@\1@' \
|
---|
| 156 | -e 's@\.tar.*@@' \
|
---|
| 157 | -e 's@\.zip.*@@'
|
---|
| 158 | ;;
|
---|
| 159 | esac
|
---|
| 160 |
|
---|
| 161 | }
|
---|
[fe30c61] | 162 | #=======================
|
---|
| 163 |
|
---|
| 164 |
|
---|
| 165 | #==== TARGET HEADER ====
|
---|
| 166 |
|
---|
| 167 | #----------------------------------#
|
---|
| 168 | LUSER_wrt_target() { # Create target and initialize log file
|
---|
| 169 | #----------------------------------#
|
---|
| 170 | local i=$1
|
---|
| 171 | local PREV=$2
|
---|
[3cb4ef5b] | 172 | local version
|
---|
| 173 | if [ "$3" != "" ]; then
|
---|
| 174 | version=-$3
|
---|
| 175 | fi
|
---|
[fe30c61] | 176 | (
|
---|
| 177 | cat << EOF
|
---|
| 178 |
|
---|
| 179 | $i: $PREV
|
---|
| 180 | @\$(call echo_message, Building)
|
---|
[75d6d1c] | 181 | ${NO_PROGRESS} @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
|
---|
[3cb4ef5b] | 182 | @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
|
---|
[2758d94] | 183 | @ : > envars
|
---|
[fe30c61] | 184 | EOF
|
---|
| 185 | ) >> $MKFILE.tmp
|
---|
| 186 | }
|
---|
| 187 |
|
---|
| 188 | #----------------------------------#
|
---|
| 189 | CHROOT_wrt_target() { # Create target and initialize log file
|
---|
| 190 | #----------------------------------#
|
---|
| 191 | local i=$1
|
---|
| 192 | local PREV=$2
|
---|
[3cb4ef5b] | 193 | local version
|
---|
| 194 | if [ "$3" != "" ]; then
|
---|
| 195 | version=-$3
|
---|
| 196 | fi
|
---|
[fe30c61] | 197 | (
|
---|
| 198 | cat << EOF
|
---|
| 199 |
|
---|
| 200 | $i: $PREV
|
---|
| 201 | @\$(call echo_message, Building)
|
---|
[75d6d1c] | 202 | ${NO_PROGRESS} @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
|
---|
[3cb4ef5b] | 203 | @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
|
---|
[2758d94] | 204 | @ : > envars
|
---|
[fe30c61] | 205 | EOF
|
---|
| 206 | ) >> $MKFILE.tmp
|
---|
| 207 | }
|
---|
| 208 |
|
---|
| 209 | #=======================
|
---|
| 210 |
|
---|
| 211 |
|
---|
| 212 | #======== UNPACK =======
|
---|
| 213 |
|
---|
| 214 | #----------------------------------#
|
---|
| 215 | LUSER_wrt_unpack() { # Unpack and set 'ROOT' var
|
---|
| 216 | #----------------------------------#
|
---|
| 217 | local FILE=$1
|
---|
| 218 | local optSAVE_PREVIOUS=$2
|
---|
| 219 |
|
---|
| 220 | if [[ "${optSAVE_PREVIOUS}" != "1" ]]; then
|
---|
| 221 | (
|
---|
| 222 | cat << EOF
|
---|
| 223 | @\$(call remove_existing_dirs,$FILE)
|
---|
| 224 | EOF
|
---|
| 225 | ) >> $MKFILE.tmp
|
---|
| 226 | fi
|
---|
| 227 |
|
---|
| 228 | (
|
---|
| 229 | cat << EOF
|
---|
[2758d94] | 230 | @\$(PRT_DU) >>logs/\$@$version
|
---|
[fe30c61] | 231 | @\$(call unpack,$FILE)
|
---|
| 232 | @\$(call get_pkg_root_LUSER)
|
---|
| 233 | EOF
|
---|
| 234 | ) >> $MKFILE.tmp
|
---|
| 235 | }
|
---|
| 236 |
|
---|
| 237 | #----------------------------------#
|
---|
| 238 | CHROOT_Unpack() { #
|
---|
| 239 | #----------------------------------#
|
---|
| 240 | local FILE=$1
|
---|
| 241 | local optSAVE_PREVIOUS=$2
|
---|
| 242 |
|
---|
| 243 | if [ "${optSAVE_PREVIOUS}" != "1" ]; then
|
---|
| 244 | (
|
---|
| 245 | cat << EOF
|
---|
| 246 | @\$(call remove_existing_dirs2,$FILE)
|
---|
| 247 | EOF
|
---|
| 248 | ) >> $MKFILE.tmp
|
---|
| 249 | fi
|
---|
[2758d94] | 250 |
|
---|
[fe30c61] | 251 | (
|
---|
[2758d94] | 252 | cat << EOF
|
---|
| 253 | @\$(PRT_DU_CR) >>logs/\$@$version
|
---|
[1f81129] | 254 | @\$(call unpack2,$FILE)
|
---|
[fe30c61] | 255 | @\$(call get_pkg_root2)
|
---|
| 256 | EOF
|
---|
| 257 | ) >> $MKFILE.tmp
|
---|
| 258 | }
|
---|
| 259 |
|
---|
| 260 | #=======================
|
---|
| 261 |
|
---|
| 262 |
|
---|
| 263 | #===== TESTS LOGS ======
|
---|
| 264 |
|
---|
| 265 | #----------------------------------#
|
---|
| 266 | LUSER_wrt_test_log() { # Initialize testsuite log file
|
---|
| 267 | #----------------------------------#
|
---|
[3cb4ef5b] | 268 | local version
|
---|
| 269 | if [ "$2" != "" ]; then
|
---|
| 270 | version=-$2
|
---|
| 271 | fi
|
---|
| 272 | local TESTLOGFILE=$1$version
|
---|
[fe30c61] | 273 | (
|
---|
| 274 | cat << EOF
|
---|
[6bb080e] | 275 | @echo "export TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
|
---|
[3cb4ef5b] | 276 | echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/$TESTLOGFILE
|
---|
[fe30c61] | 277 | EOF
|
---|
| 278 | ) >> $MKFILE.tmp
|
---|
| 279 | }
|
---|
| 280 |
|
---|
| 281 | #----------------------------------#
|
---|
| 282 | CHROOT_wrt_test_log() { #
|
---|
| 283 | #----------------------------------#
|
---|
[3cb4ef5b] | 284 | local version
|
---|
| 285 | if [ "$2" != "" ]; then
|
---|
| 286 | version=-$2
|
---|
| 287 | fi
|
---|
| 288 | local TESTLOGFILE=$1$version
|
---|
[fe30c61] | 289 | (
|
---|
| 290 | cat << EOF
|
---|
[8f2c086] | 291 | @echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
|
---|
[3cb4ef5b] | 292 | echo "\$(nl_)\`date\`\$(nl_)" >\$(crTESTLOGDIR)/$TESTLOGFILE
|
---|
[fe30c61] | 293 | EOF
|
---|
| 294 | ) >> $MKFILE.tmp
|
---|
| 295 | }
|
---|
| 296 |
|
---|
| 297 | #=======================
|
---|
| 298 |
|
---|
| 299 |
|
---|
| 300 | #======== RUN AS =======
|
---|
| 301 |
|
---|
| 302 | #----------------------------------#
|
---|
| 303 | wrt_RunAsRoot() { # Some scripts must be run as root..
|
---|
| 304 | #----------------------------------#
|
---|
| 305 | local MOUNT_ENV
|
---|
[3cb4ef5b] | 306 | local version
|
---|
| 307 | if [ "$2" != "" ]; then
|
---|
| 308 | version=-$2
|
---|
| 309 | fi
|
---|
[8f2c086] | 310 | local file=$1
|
---|
[fe30c61] | 311 |
|
---|
| 312 | case ${PROGNAME} in
|
---|
| 313 | lfs ) MOUNT_ENV="LFS" ;;
|
---|
| 314 | clfs ) MOUNT_ENV="CLFS" ;;
|
---|
| 315 | clfs2 ) MOUNT_ENV="CLFS" ;;
|
---|
| 316 | clfs3 ) MOUNT_ENV="CLFS" ;;
|
---|
| 317 | hlfs ) MOUNT_ENV="HLFS" ;;
|
---|
| 318 | *) echo "undefined progname $PROGNAME"; exit 1 ;;
|
---|
| 319 | esac
|
---|
| 320 |
|
---|
| 321 | (
|
---|
| 322 | cat << EOF
|
---|
[68713c9] | 323 | @export ${MOUNT_ENV}=\$(MOUNT_PT) && \\
|
---|
[3cb4ef5b] | 324 | ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
|
---|
[939731a] | 325 | if [ "${PROGNAME}" != lfs ]; then \\
|
---|
| 326 | \$(PRT_DU) >>logs/\$@$version; \\
|
---|
| 327 | fi
|
---|
[fe30c61] | 328 | EOF
|
---|
| 329 | ) >> $MKFILE.tmp
|
---|
| 330 | }
|
---|
| 331 |
|
---|
| 332 | #----------------------------------#
|
---|
[0210014] | 333 | LUSER_wrt_RunAsUser() { # Calculate time with perl, footer to log file
|
---|
[fe30c61] | 334 | #----------------------------------#
|
---|
| 335 | local file=$1
|
---|
[3cb4ef5b] | 336 | local version
|
---|
| 337 | if [ "$2" != "" ]; then
|
---|
| 338 | version=-$2
|
---|
| 339 | fi
|
---|
[fe30c61] | 340 |
|
---|
| 341 | (
|
---|
| 342 | cat << EOF
|
---|
[68713c9] | 343 | @source ~/.bashrc && \\
|
---|
[2758d94] | 344 | \$(CMDSDIR)/`dirname $file`/\$@ >> \$(LOGDIR)/\$@$version 2>&1 && \\
|
---|
| 345 | if [ "${PROGNAME}" != lfs ]; then \$(PRT_DU) >>logs/\$@$version; fi
|
---|
[fe30c61] | 346 | EOF
|
---|
| 347 | ) >> $MKFILE.tmp
|
---|
| 348 | }
|
---|
| 349 |
|
---|
| 350 | #----------------------------------#
|
---|
| 351 | CHROOT_wrt_RunAsRoot() { #
|
---|
| 352 | #----------------------------------#
|
---|
| 353 | local file=$1
|
---|
[3cb4ef5b] | 354 | local version
|
---|
| 355 | if [ "$2" != "" ]; then
|
---|
| 356 | version=-$2
|
---|
| 357 | fi
|
---|
[fe30c61] | 358 | (
|
---|
| 359 | cat << EOF
|
---|
[68713c9] | 360 | @source envars && \\
|
---|
[2758d94] | 361 | \$(crCMDSDIR)/`dirname $file`/\$@ >>\$(crLOGDIR)/\$@$version 2>&1 && \\
|
---|
| 362 | if [ "${PROGNAME}" != lfs ]; then \$(PRT_DU_CR) >>logs/\$@$version; fi
|
---|
[fe30c61] | 363 | EOF
|
---|
| 364 | ) >> $MKFILE.tmp
|
---|
| 365 |
|
---|
| 366 | }
|
---|
| 367 |
|
---|
| 368 | #=======================
|
---|
| 369 |
|
---|
| 370 |
|
---|
| 371 | #====== COPY FSTAB =====
|
---|
| 372 |
|
---|
| 373 | #----------------------------------#
|
---|
| 374 | LUSER_wrt_CopyFstab() { #
|
---|
| 375 | #----------------------------------#
|
---|
| 376 | (
|
---|
| 377 | cat << EOF
|
---|
[68713c9] | 378 | @cp -v \$(MOUNT_PT)/sources/fstab \$(MOUNT_PT)/etc/fstab >>logs/\$@ 2>&1 && \\
|
---|
[0210014] | 379 | \$(PRT_DU) >>logs/\$@
|
---|
[fe30c61] | 380 | EOF
|
---|
| 381 | ) >> $MKFILE.tmp
|
---|
| 382 | }
|
---|
| 383 |
|
---|
| 384 | #----------------------------------#
|
---|
| 385 | CHROOT_wrt_CopyFstab() { #
|
---|
| 386 | #----------------------------------#
|
---|
| 387 | (
|
---|
| 388 | cat << EOF
|
---|
[68713c9] | 389 | @cp -v /sources/fstab /etc/fstab >>logs/\$@ 2>&1 && \\
|
---|
[0210014] | 390 | \$(PRT_DU_CR) >>logs/\$@
|
---|
[fe30c61] | 391 | EOF
|
---|
| 392 | ) >> $MKFILE.tmp
|
---|
| 393 | }
|
---|
| 394 |
|
---|
| 395 | #=======================
|
---|
| 396 |
|
---|
| 397 |
|
---|
[93346ee] | 398 | #==== INSTALLED FILES LOGS ====
|
---|
| 399 |
|
---|
[f546320] | 400 | #----------------------------------#
|
---|
| 401 | LUSER_wrt_TouchTimestamp() { #
|
---|
| 402 | #----------------------------------#
|
---|
| 403 | (
|
---|
| 404 | cat << EOF
|
---|
| 405 | @\$(call touch_timestamp_LUSER)
|
---|
| 406 | EOF
|
---|
| 407 | ) >> $MKFILE.tmp
|
---|
| 408 | }
|
---|
| 409 |
|
---|
[93346ee] | 410 | #----------------------------------#
|
---|
| 411 | CHROOT_wrt_TouchTimestamp() { #
|
---|
| 412 | #----------------------------------#
|
---|
| 413 | (
|
---|
| 414 | cat << EOF
|
---|
| 415 | @\$(call touch_timestamp)
|
---|
| 416 | EOF
|
---|
| 417 | ) >> $MKFILE.tmp
|
---|
| 418 | }
|
---|
| 419 |
|
---|
[f546320] | 420 | #----------------------------------#
|
---|
| 421 | LUSER_wrt_LogNewFiles() { #
|
---|
| 422 | #----------------------------------#
|
---|
| 423 | (
|
---|
| 424 | cat << EOF
|
---|
[13e52a5] | 425 | @\$(call log_new_files_LUSER,$1)
|
---|
[f546320] | 426 | EOF
|
---|
| 427 | ) >> $MKFILE.tmp
|
---|
| 428 | }
|
---|
| 429 |
|
---|
[93346ee] | 430 | #----------------------------------#
|
---|
| 431 | CHROOT_wrt_LogNewFiles() { #
|
---|
| 432 | #----------------------------------#
|
---|
| 433 | (
|
---|
| 434 | cat << EOF
|
---|
[13e52a5] | 435 | @\$(call log_new_files,$1)
|
---|
[93346ee] | 436 | EOF
|
---|
| 437 | ) >> $MKFILE.tmp
|
---|
| 438 | }
|
---|
| 439 |
|
---|
| 440 | #=======================
|
---|
| 441 |
|
---|
| 442 |
|
---|
[fe30c61] | 443 | #==== RM BUILD DIRS ====
|
---|
| 444 |
|
---|
| 445 | #----------------------------------#
|
---|
| 446 | LUSER_RemoveBuildDirs() { #
|
---|
| 447 | #----------------------------------#
|
---|
[e639536] | 448 | local name=`echo ${1} | sed 's/[0-9]-//'`
|
---|
[fe30c61] | 449 | (
|
---|
| 450 | cat << EOF
|
---|
| 451 | @\$(call remove_build_dirs,$name)
|
---|
| 452 | EOF
|
---|
| 453 | ) >> $MKFILE.tmp
|
---|
| 454 | }
|
---|
| 455 |
|
---|
| 456 | #----------------------------------#
|
---|
| 457 | CHROOT_wrt_RemoveBuildDirs() { #
|
---|
| 458 | #----------------------------------#
|
---|
[e639536] | 459 | local name=`echo ${1} | sed 's/[0-9]-//'`
|
---|
[fe30c61] | 460 | (
|
---|
| 461 | cat << EOF
|
---|
| 462 | @\$(call remove_build_dirs2,$name)
|
---|
| 463 | EOF
|
---|
| 464 | ) >> $MKFILE.tmp
|
---|
| 465 | }
|
---|
| 466 |
|
---|
| 467 | #=======================
|
---|
| 468 |
|
---|
| 469 |
|
---|
| 470 | #======== TOUCH ========
|
---|
| 471 |
|
---|
| 472 | #----------------------------------#
|
---|
| 473 | wrt_touch() { #
|
---|
| 474 | #----------------------------------#
|
---|
| 475 | (
|
---|
| 476 | cat << EOF
|
---|
| 477 | @\$(call housekeeping)
|
---|
| 478 | EOF
|
---|
| 479 | ) >> $MKFILE.tmp
|
---|
| 480 | }
|
---|
| 481 |
|
---|
| 482 | #=======================
|
---|