ports

recipes for building multiple softwares
git clone git://z3bra.org/ports
Log | Files | Refs

commit d8143e3d17194eb5b2e7da1def91c5330a71ecb1
parent 7e5411e9c1d5052055628ce2d1a0b3e292b6849c
Author: z3bra <willyatmailoodotorg>
Date:   Wed Sep 16 23:04:31 2015

Remove /usr prefix everywhere

Diffstat:
 ash/makeme      |  4 ++--
 fs/makeme       |  4 ++--
 init/makeme     | 14 +++++++-------
 iproute2/makeme | 11 +++++------
 iputils/makeme  |  6 +++---
 mksh/makeme     |  8 ++++----
 musl/makeme     | 11 +++++------
 pcc-libs/makeme |  2 +-
 pcc/makeme      | 14 +++++---------
 pmkit/makeme    |  6 +++---
 sinit/config.h  |  4 ++--
 sinit/makeme    | 31 +++++++++++++------------------
 12 files changed, 52 insertions(+), 63 deletions(-)

diff --git a/ash/makeme b/ash/makeme @@ -18,8 +18,8 @@ package() mkdir -p $WORKDIR/$name/bin cp sh $WORKDIR/$name/bin/sh chmod 755 $WORKDIR/$name/bin/sh - mkdir -p $WORKDIR/$name/usr/share/man/man1 - cp sh.1 $WORKDIR/$name/usr/share/man/man1/sh.1 + mkdir -p $WORKDIR/$name/share/man/man1 + cp sh.1 $WORKDIR/$name/share/man/man1/sh.1 cd .. rm -r $name-$version diff --git a/fs/makeme b/fs/makeme @@ -40,8 +40,8 @@ package() { EOF cat <<EOF> $WORKDIR/$name/etc/profile - PATH=/bin:/sbin:/usr/bin:/usr/sbin - MANPATH=/share/man:/usr/share/man + PATH=/bin:/sbin + MANPATH=/share/man export PATH MANPATH diff --git a/init/makeme b/init/makeme @@ -16,15 +16,15 @@ package() { $CC $CFLAGS init.c -o init $LDFLAGS mkdir -p $WORKDIR/$name/sbin - mkdir -p $WORKDIR/$name/usr/libexec - cp init $WORKDIR/$name/sbin/init - cp ../rc $WORKDIR/$name/sbin/rc - cp ../power.subr $WORKDIR/$name/usr/libexec/power.subr + mkdir -p $WORKDIR/$name/libexec + cp init $WORKDIR/$name/sbin/init + cp ../rc $WORKDIR/$name/sbin/rc + cp ../power.subr $WORKDIR/$name/libexec/power.subr chmod 750 $WORKDIR/$name/sbin/rc - chmod 750 $WORKDIR/$name/usr/libexec/power.subr - ln -sf /usr/libexec/power.subr $WORKDIR/$name/sbin/reboot - ln -sf /usr/libexec/power.subr $WORKDIR/$name/sbin/poweroff + chmod 750 $WORKDIR/$name/libexec/power.subr + ln -sf /libexec/power.subr $WORKDIR/$name/sbin/reboot + ln -sf /libexec/power.subr $WORKDIR/$name/sbin/poweroff cd .. rm -r $name-$version diff --git a/iproute2/makeme b/iproute2/makeme @@ -9,15 +9,14 @@ package() { cat ../patches/*.patch | patch -Np1 sed -i '/^TARGETS=/s: arpd : :' misc/Makefile - sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h - sed -i -e 's:=/share:=/usr/share:' \ - -e 's:-Werror::' Makefile + sed -i 's:/usr/local::' tc/m_ipt.c include/iptables.h + sed -i -e 's:-Werror::' Makefile - ./configure --host=x86_64-linux-musl + ./configure $CONFIGURE_OPT make CC="$CC" LDFLAGS="$LDFLAGS" CCOPT="-D_GNU_SOURCE -Os" - make DESTDIR=$WORKDIR/$name PREFIX='' DATADIR=/usr/share install + make DESTDIR=$WORKDIR/$name PREFIX='' DATADIR=/share install - rm -rf $WORKDIR/$name/usr/share/doc + rm -rf $WORKDIR/$name/share/doc cd .. rm -r $name-$version } diff --git a/iputils/makeme b/iputils/makeme @@ -10,9 +10,9 @@ package() { make USE_GNUTLS=no CC="$CC" LDFLAGS="$LDFLAGS" - install -d $WORKDIR/$name/{{s,}bin,usr/{man/man8,sbin}} + install -d $WORKDIR/$name/{{s,}bin,man/man8} install ping{,6} $WORKDIR/$name/bin/ install arping $WORKDIR/$name/sbin/ - install tracepath{,6} traceroute6 clockdiff rarpd rdisc $WORKDIR/$name/usr/sbin/ - chmod u+s $WORKDIR/$name/bin/ping{,6} $WORKDIR/$name/usr/sbin/traceroute6 + install tracepath{,6} traceroute6 clockdiff rarpd rdisc $WORKDIR/$name/sbin/ + chmod u+s $WORKDIR/$name/bin/ping{,6} $WORKDIR/$name/sbin/traceroute6 } diff --git a/mksh/makeme b/mksh/makeme @@ -9,12 +9,12 @@ package() { mkdir -p $WORKDIR/$name/bin mkdir -p $WORKDIR/$name/etc - mkdir -p $WORKDIR/$name/usr/share/man/man1 - mkdir -p $WORKDIR/$name/usr/share/examples + mkdir -p $WORKDIR/$name/share/man/man1 + mkdir -p $WORKDIR/$name/share/examples install -m 0755 mksh $WORKDIR/$name/bin/mksh - install -m 0644 mksh.1 $WORKDIR/$name/usr/share/man/man1/mksh.1 - install -m 0644 dot.mkshrc $WORKDIR/$name/usr/share/examples/mkshrc + install -m 0644 mksh.1 $WORKDIR/$name/share/man/man1/mksh.1 + install -m 0644 dot.mkshrc $WORKDIR/$name/share/examples/mkshrc install -m 0644 dot.mkshrc $WORKDIR/$name/etc/mkshrc cd .. diff --git a/musl/makeme b/musl/makeme @@ -5,13 +5,12 @@ source=http://www.musl-libc.org/releases/$name-$version.tar.gz package() { curl -# $source | tar xz cd $name-$version - ./configure --prefix=/usr \ - --target=${TOOLCHAIN_TRIPLET} + ./configure $CONFIGURE_OPT make CC="$CC" LDFLAGS="$LDFLAGS" make DESTDIR=$WORKDIR/$name install - mkdir -p $WORKDIR/$name/usr/bin - ln -sf /lib/ld-musl-x86_64.so.1 $WORKDIR/$name/usr/bin/ldd - cp ../ldconfig $WORKDIR/$name/usr/bin/ldconfig - chmod 755 $WORKDIR/$name/usr/bin/ldconfig + mkdir -p $WORKDIR/$name/bin + ln -sf /lib/ld-musl-x86_64.so.1 $WORKDIR/$name/bin/ldd + cp ../ldconfig $WORKDIR/$name/bin/ldconfig + chmod 755 $WORKDIR/$name/bin/ldconfig } diff --git a/pcc-libs/makeme b/pcc-libs/makeme @@ -8,7 +8,7 @@ package() { cat ../patches/*.patch | patch -Np1 - ./configure --prefix=/usr --build=$CBUILD --host=$CHOST + ./configure $CONFIGURE_OPT make CC="$CC" LDFLAGS="$LDFLAGS" make DESTDIR=$WORKDIR/$name install diff --git a/pcc/makeme b/pcc/makeme @@ -7,14 +7,10 @@ package() { cd $name-$version cat ../patches/*.patch | patch -Np1 - ./configure --prefix=/usr \ - --libexecdir=/usr/lib/pcc \ - --build=$CBUILD \ - --host=$CHOST + ./configure $CONFIGURE_OPT --libexecdir=/libexec/pcc - make CC="$CC" LDFLAGS="$LDFLAGS" - make DESTDIR=$WORKDIR/$name \ - PREFIX=/usr \ - MANPREFIX=/usr/man \ - install + make CC="$CC" LDFLAGS="$LDFLAGS" + make DESTDIR=$WORKDIR/$name \ + MANPREFIX=/man \ + install } diff --git a/pmkit/makeme b/pmkit/makeme @@ -11,9 +11,9 @@ package() { cd $name-$version fi - mkdir -p $WORKDIR/$name/usr/bin + mkdir -p $WORKDIR/$name/bin mkdir -p $WORKDIR/$name/var/lib/pmkit - cp pmkit $WORKDIR/$name/usr/bin/pmkit - chmod 755 $WORKDIR/$name/usr/bin/pmkit + cp pmkit $WORKDIR/$name/bin/pmkit + chmod 755 $WORKDIR/$name/bin/pmkit } diff --git a/sinit/config.h b/sinit/config.h @@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ static char *const rcinitcmd[] = { "/sbin/rc", NULL }; -static char *const rcrebootcmd[] = { "/usr/libexec/power.subr", "reboot", NULL }; -static char *const rcpoweroffcmd[] = { "/usr/libexec/power.subr", "poweroff", NULL }; +static char *const rcrebootcmd[] = { "/libexec/power.subr", "reboot", NULL }; +static char *const rcpoweroffcmd[] = { "/libexec/power.subr", "poweroff", NULL }; diff --git a/sinit/makeme b/sinit/makeme @@ -4,31 +4,26 @@ source=git://git.2f30.org/$name commit=HEAD package() { - if cd $name-$version; then - git reset --hard - git pull - else - git clone $source $name-$version - cd $name-$version - fi + git clone $source $name-$version + cd $name-$version test -f ../config.h && cp ../config.h config.h - make CC="$CC" LDFLAGS="$LDFLAGS" \ - DESTDIR=$WORKDIR/$name \ - PREFIX= \ - MANPREFIX=/usr/share/man \ + make CC="$CC" LDFLAGS="$LDFLAGS" \ + DESTDIR=$WORKDIR/$name \ + PREFIX= \ + MANPREFIX=/share/man \ mkdir -p $WORKDIR/$name/sbin - mkdir -p $WORKDIR/$name/usr/libexec - cp sinit $WORKDIR/$name/sbin/init - cp ../rc $WORKDIR/$name/sbin/rc - cp ../power.subr $WORKDIR/$name/usr/libexec/power.subr - cp ../reboot $WORKDIR/$name/sbin/reboot - cp ../poweroff $WORKDIR/$name/sbin/poweroff + mkdir -p $WORKDIR/$name/libexec + cp sinit $WORKDIR/$name/sbin/init + cp ../rc $WORKDIR/$name/sbin/rc + cp ../power.subr $WORKDIR/$name/libexec/power.subr + cp ../reboot $WORKDIR/$name/sbin/reboot + cp ../poweroff $WORKDIR/$name/sbin/poweroff chmod 750 $WORKDIR/$name/sbin/rc chmod 750 $WORKDIR/$name/sbin/reboot chmod 750 $WORKDIR/$name/sbin/poweroff - chmod 755 $WORKDIR/$name/usr/libexec/power.subr + chmod 755 $WORKDIR/$name/libexec/power.subr }