mkports

recipes for building multiple softwares with mk(1)
git clone git://z3bra.org/mkports
Log | Files | Refs

commit 0a6d8fc5159279a8d8c0cae9c51788e158e6aff8
parent 4b9941b97c26d570e6528df30355161a036b21b3
Author: z3bra <willyatmailoodotorg>
Date:   Fri Jan 22 23:34:02 2016

new ports: git fs libexpat

Diffstat:
 fs/mkfile                                 | 63 ++++++++++++++++++++++++++++++++-
 git/mkfile                                | 22 +++++++++++-
 libexpat/mkfile                           |  6 +++-
 libexpat/patches/000-musl-config_sub.diff | 22 +++++++++++-
 4 files changed, 113 insertions(+), 0 deletions(-)

diff --git a/fs/mkfile b/fs/mkfile @@ -0,0 +1,63 @@ +pkg = fs +ver = 0.1 +destdir = `{printf '%s/%s/.rootfs' "$(pwd)" "$pkg-$ver"} + +<../config.mk + +$pkg\#$ver.tar.bz2:Q: build-fs + cd $destdir + tar -c $(ls) | bzip2 -c > ../../$target + +build-fs:QV: + for dir in dev etc proc sys tmp; do + mkdir -p $destdir/$dir + done + for vardir in run log lock tmp; do + mkdir -p $destdir/var/$vardir + done + cat <<EOF> $destdir/etc/group + root:!:0:root + bin:!:1:root,bin,daemon + daemon:!:2:root,bin,daemon + sys:!:3:root,bin + adm:!:4:root,daemon + tty:!:5: + disk:!:6:root + cdrom:!:7:root + video:!:8:root + audio:!:9:root + nogroup:!:65534: + EOF + cat <<EOF> $destdir/etc/passwd + root:x:0:0:root:/root:/bin/sh + bin:*:1:1:bin:/bin:/bin/false + daemon:*:2:2:daemon:/sbin:/bin/false + nobody:*:65534:65534:nobody:/nonexistent:/bin/false + EOF + cat <<EOF> $destdir/etc/shells + /bin/sh + /bin/mksh + EOF + cat <<EOF> $destdir/etc/profile + PATH=/bin:/sbin + MANPATH=/man + export PATH MANPATH + umask 022 + EOF + cat <<EOF> $destdir/etc/fstab + tmp /tmp tmpfs defaults 0 0 + tmp /var/run tmpfs defaults 0 0 + shm /dev/shm tmpfs rw,nosuid,nodev 0 0 + devpts /dev/pts devpts gid=5,mode=620 0 0 + EOF + cat <<EOF> $destdir/etc/resolv.conf + # from FreeDNS - https://freedns.zone + nameserver 37.235.1.174 + nameserver 37.235.1.177 + EOF + +clean:V: + rm -rf $pkg-$ver + +distclean:V: clean + rm -f $pkg\#$ver.tar.bz2 diff --git a/git/mkfile b/git/mkfile @@ -0,0 +1,22 @@ +pkg = git +ver = 2.7.0 +url = https://www.kernel.org/pub/software/scm/git/$pkg-$ver.tar.xz + +<../config.mk +<../default.mk + +CONFIGURE = ${CONFIGURE} --prefix=/ +MAKEFLAGS = ${MAKEFLAGS} \ + NO_TCLTK=1 \ + NO_PYTHON=1 \ + NO_EXPAT=1 \ + NO_GETTEXT=1 \ + INSTALLMAN3DIR=/man/man3 \ + gitexecdir=/lib/git-core \ + V=1 \ + all + +cleanup:QV: install + mv $destdir/usr/lib/perl5 $destdir/lib/ + rm -r $destdir/share + rm -r $destdir/usr diff --git a/libexpat/mkfile b/libexpat/mkfile @@ -0,0 +1,6 @@ +pkg = libexpat +ver = 2.0.1 +url = http://downloads.sourceforge.net/expat/expat-$ver.tar.gz + +<../config.mk +<../default.mk diff --git a/libexpat/patches/000-musl-config_sub.diff b/libexpat/patches/000-musl-config_sub.diff @@ -0,0 +1,22 @@ +diff -urN a/conftools/config.sub b/conftools/config.sub +--- a/conftools/config.sub 2006-09-22 16:42:54.000000000 +0200 ++++ b/conftools/config.sub 2016-01-22 20:56:15.879972421 +0100 +@@ -120,7 +120,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ nto-qnx* | linux-gnu* | linux-musl | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os +@@ -1243,6 +1243,9 @@ + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; ++ -linux-musl) ++ os=-linux-musl ++ ;; + -linux-dietlibc) + os=-linux-dietlibc + ;;