morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit ac90eb3aa3e52037f89b071be0ba44ef8660123e
parent b4165184fed0cbc6913eaab207c2f5f110c38aca
Author: Daniel Bainton <dpb@driftaway.org>
Date:   Sun Mar  9 13:46:05 +0200

Move each package to their own dir

Also support for the $pkgdir variable in build files, which will include
the full path to the directory of the package (for patches, configs etc)

Diffstat:
mkfile | 4+++-
pkgs/9base | 17-----------------
pkgs/9base/build | 17+++++++++++++++++
pkgs/abduco | 11-----------
pkgs/abduco/build | 11+++++++++++
pkgs/busybox | 58----------------------------------------------------------
pkgs/busybox/build | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pkgs/crossmusl | 14--------------
pkgs/crossmusl/build | 14++++++++++++++
pkgs/dropbear | 8--------
pkgs/dropbear/build | 8++++++++
pkgs/dvtm | 11-----------
pkgs/dvtm/build | 11+++++++++++
pkgs/dwm | 12------------
pkgs/dwm/build | 12++++++++++++
pkgs/e2fsprogs | 29-----------------------------
pkgs/e2fsprogs/build | 29+++++++++++++++++++++++++++++
pkgs/extlinux | 2--
pkgs/extlinux/build | 2++
pkgs/file | 99-------------------------------------------------------------------------------
pkgs/file/build | 99+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pkgs/fs | 5-----
pkgs/fs/build | 5+++++
pkgs/jupp | 19-------------------
pkgs/jupp/build | 19+++++++++++++++++++
pkgs/kernel | 18------------------
pkgs/kernel/build | 18++++++++++++++++++
pkgs/libevent | 8--------
pkgs/libevent/build | 8++++++++
pkgs/linux_fw | 9---------
pkgs/linux_fw/build | 9+++++++++
pkgs/make | 8--------
pkgs/make/build | 8++++++++
pkgs/man | 7-------
pkgs/man/build | 7+++++++
pkgs/mksh | 79-------------------------------------------------------------------------------
pkgs/mksh/build | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pkgs/mpg123 | 17-----------------
pkgs/mpg123/build | 17+++++++++++++++++
pkgs/ncurses | 18------------------
pkgs/ncurses/build | 18++++++++++++++++++
pkgs/prepare_root | 17-----------------
pkgs/prepare_root/build | 17+++++++++++++++++
pkgs/quark | 10----------
pkgs/quark/build | 10++++++++++
pkgs/rsync | 8--------
pkgs/rsync/build | 8++++++++
pkgs/sbase | 30------------------------------
pkgs/sbase/build | 30++++++++++++++++++++++++++++++
pkgs/sdhcp | 9---------
pkgs/sdhcp/build | 9+++++++++
pkgs/sic | 7-------
pkgs/sic/build | 7+++++++
pkgs/sinit | 10----------
pkgs/sinit/build | 10++++++++++
pkgs/smdev | 22----------------------
pkgs/smdev/build | 22++++++++++++++++++++++
pkgs/stage0 | 1-
pkgs/stage0/build | 1+
pkgs/terminus | 15---------------
pkgs/terminus/build | 15+++++++++++++++
pkgs/tinyalsa | 16----------------
pkgs/tinyalsa/build | 16++++++++++++++++
pkgs/tinywm | 5-----
pkgs/tinywm/build | 5+++++
pkgs/tinyxlib | 8--------
pkgs/tinyxlib/build | 8++++++++
pkgs/tinyxserver | 19-------------------
pkgs/tinyxserver/build | 19+++++++++++++++++++
pkgs/tmux | 9---------
pkgs/tmux/build | 9+++++++++
pkgs/ubase | 30------------------------------
pkgs/ubase/build | 30++++++++++++++++++++++++++++++
pkgs/uuterm | 7-------
pkgs/uuterm/build | 7+++++++
pkgs/vim | 12------------
pkgs/vim/build | 12++++++++++++
pkgs/xsetroot | 5-----
pkgs/xsetroot/build | 5+++++
pkgs/zlib | 8--------
pkgs/zlib/build | 8++++++++
stuff/cmp-fetch | 2+-
stuff/cmp-pkgs | 2+-
stuff/fetch-pkg.mk | 6++++--
84 files changed, 706 insertions(+), 702 deletions(-)
diff --git a/mkfile b/mkfile @@ -23,11 +23,13 @@ fetch-all fetch-world:VQ: ${fetchpkgs} `{ mkdir -p src } `{ mkdir -p .cache } `{ printf '# auto-generated file, do not edit\n' > pkgs.mk } -`{ cd pkgs && for pkg in *; do cat $pkg ../stuff/fetch-pkg.mk |\ +`{ cd pkgs && for pkg in *; do cat $pkg/build ../stuff/fetch-pkg.mk |\ sed -e "s,^build:,$pkg:QP./stuff/cmp-pkgs: $pkg-fetch pkgs/$pkg," |\ sed -e "s,^fetch-target:,$pkg-fetch:," |\ sed -e "s,^v=,_${pkg}_v=," |\ + sed -e "s,^pkgdir=,_${pkg}_pkgdir=$top/pkgs/$pkg," |\ sed -e "s,\$v,\${_${pkg}_v},g" |\ + sed -e "s,\$pkgdir,\${_${pkg}_pkgdir},g" |\ sed -e "s,\$url,\${_${pkg}_url},g" |\ sed -e "s, url=, _${pkg}_url=,g" |\ sed -e "s,\$git,\${_${pkg}_git},g" |\ diff --git a/pkgs/9base b/pkgs/9base @@ -1,17 +0,0 @@ -git="git://git.suckless.org/9base" - -build: crossmusl - targets="mk" - cd src/9base - make clean - for t in lib9 yacc; do - cd $t - make -j$nprocs CC=$CC - cd .. - done - for t in $targets; do - cd $t - make -j$nprocs CC=$CC - cp $t "$root/bin/" - cd .. - done diff --git a/pkgs/9base/build b/pkgs/9base/build @@ -0,0 +1,17 @@ +git="git://git.suckless.org/9base" + +build: crossmusl + targets="mk" + cd src/9base + make clean + for t in lib9 yacc; do + cd $t + make -j$nprocs CC=$CC + cd .. + done + for t in $targets; do + cd $t + make -j$nprocs CC=$CC + cp $t "$root/bin/" + cd .. + done diff --git a/pkgs/abduco b/pkgs/abduco @@ -1,11 +0,0 @@ -git="git://repo.or.cz/abduco.git" - -build: crossmusl - cd src/abduco - make clean - sed -i "s@PREFIX = /usr/local@PREFIX = /@" config.mk - sed -i "s@INCS = -I. -I/usr/include -I/usr/local/include@INCS = -I. -I$libcroot/include@" config.mk - sed -i "s@LDFLAGS += -L/usr/lib -L/usr/local/lib ${LIBS}@LDFLAGS += $LDFLAGS ${LIBS} @" config.mk - sed -i "s@CC = cc@CC = $CC@" config.mk - make - make DESTDIR="$root" install diff --git a/pkgs/abduco/build b/pkgs/abduco/build @@ -0,0 +1,11 @@ +git="git://repo.or.cz/abduco.git" + +build: crossmusl + cd src/abduco + make clean + sed -i "s@PREFIX = /usr/local@PREFIX = /@" config.mk + sed -i "s@INCS = -I. -I/usr/include -I/usr/local/include@INCS = -I. -I$libcroot/include@" config.mk + sed -i "s@LDFLAGS += -L/usr/lib -L/usr/local/lib ${LIBS}@LDFLAGS += $LDFLAGS ${LIBS} @" config.mk + sed -i "s@CC = cc@CC = $CC@" config.mk + make + make DESTDIR="$root" install diff --git a/pkgs/busybox b/pkgs/busybox @@ -1,58 +0,0 @@ -v="1.22.1" -url="$mirror/busybox-$v.tar.bz2" - -build: crossmusl sbase - cd src/busybox-$v - cp $top/stuff/busybox.config .config - make -j$nprocs HOSTCC="$CC -static" CC=$CC busybox - cp busybox "$root/bin" - cd "$root/bin" - ln -sf busybox addgroup - ln -sf busybox adduser - ln -sf busybox awk - ln -sf busybox bunzip2 - ln -sf busybox bzcat - ln -sf busybox bzip2 - ln -sf busybox cp - ln -sf busybox delgroup - ln -sf busybox deluser - ln -sf busybox diff - ln -sf busybox dd - ln -sf busybox ed - ln -sf busybox expr - ln -sf busybox find - ln -sf busybox fdisk - ln -sf busybox fuser - ln -sf busybox grep - ln -sf busybox gunzip - ln -sf busybox gzip - ln -sf busybox hexdump - ln -sf busybox hwclock - ln -sf busybox ifconfig - ln -sf busybox ip - ln -sf busybox kbd_mode - ln -sf busybox killall - ln -sf busybox less - ln -sf busybox login - ln -sf busybox losetup - ln -sf busybox nc - ln -sf busybox od - ln -sf busybox passwd - ln -sf busybox ping - ln -sf busybox pkill - ln -sf busybox printf - ln -sf busybox reset - ln -sf busybox route - ln -sf busybox sed - ln -sf busybox stty - ln -sf busybox sysctl - ln -sf busybox tac - ln -sf busybox tar - ln -sf busybox telnet - ln -sf busybox tftp - ln -sf busybox tftpd - ln -sf busybox top - ln -sf busybox wget - ln -sf busybox xz - ln -sf busybox xzcat - ln -sf busybox zcat diff --git a/pkgs/busybox/build b/pkgs/busybox/build @@ -0,0 +1,58 @@ +v="1.22.1" +url="$mirror/busybox-$v.tar.bz2" + +build: crossmusl sbase + cd src/busybox-$v + cp $top/stuff/busybox.config .config + make -j$nprocs HOSTCC="$CC -static" CC=$CC busybox + cp busybox "$root/bin" + cd "$root/bin" + ln -sf busybox addgroup + ln -sf busybox adduser + ln -sf busybox awk + ln -sf busybox bunzip2 + ln -sf busybox bzcat + ln -sf busybox bzip2 + ln -sf busybox cp + ln -sf busybox delgroup + ln -sf busybox deluser + ln -sf busybox diff + ln -sf busybox dd + ln -sf busybox ed + ln -sf busybox expr + ln -sf busybox find + ln -sf busybox fdisk + ln -sf busybox fuser + ln -sf busybox grep + ln -sf busybox gunzip + ln -sf busybox gzip + ln -sf busybox hexdump + ln -sf busybox hwclock + ln -sf busybox ifconfig + ln -sf busybox ip + ln -sf busybox kbd_mode + ln -sf busybox killall + ln -sf busybox less + ln -sf busybox login + ln -sf busybox losetup + ln -sf busybox nc + ln -sf busybox od + ln -sf busybox passwd + ln -sf busybox ping + ln -sf busybox pkill + ln -sf busybox printf + ln -sf busybox reset + ln -sf busybox route + ln -sf busybox sed + ln -sf busybox stty + ln -sf busybox sysctl + ln -sf busybox tac + ln -sf busybox tar + ln -sf busybox telnet + ln -sf busybox tftp + ln -sf busybox tftpd + ln -sf busybox top + ln -sf busybox wget + ln -sf busybox xz + ln -sf busybox xzcat + ln -sf busybox zcat diff --git a/pkgs/crossmusl b/pkgs/crossmusl @@ -1,14 +0,0 @@ -v="0.9.15" -url="$mirror/crossx86-$arch-linux-musl-$v.tar.xz" - -build: prepare_root - targets="ar as c++ g++ gcc ld ld.bfd nm objcopy objdump ranlib strip" - cd src - cp -r $arch-linux-musl "$root/opt/cross/" - if test "$arch" = "x86_64"; then - mv "$root/opt/cross/$arch-linux-musl/$arch-linux-musl/lib64"/* "$root/opt/cross/$arch-linux-musl/$arch-linux-musl/lib" - fi - for t in ${targets}; do - ln -sf ../opt/cross/$arch-linux-musl/bin/$arch-linux-musl-$t "$root/bin/$t" - done - ln -sf gcc "$root/bin/cc" diff --git a/pkgs/crossmusl/build b/pkgs/crossmusl/build @@ -0,0 +1,14 @@ +v="0.9.15" +url="$mirror/crossx86-$arch-linux-musl-$v.tar.xz" + +build: prepare_root + targets="ar as c++ g++ gcc ld ld.bfd nm objcopy objdump ranlib strip" + cd src + cp -r $arch-linux-musl "$root/opt/cross/" + if test "$arch" = "x86_64"; then + mv "$root/opt/cross/$arch-linux-musl/$arch-linux-musl/lib64"/* "$root/opt/cross/$arch-linux-musl/$arch-linux-musl/lib" + fi + for t in ${targets}; do + ln -sf ../opt/cross/$arch-linux-musl/bin/$arch-linux-musl-$t "$root/bin/$t" + done + ln -sf gcc "$root/bin/cc" diff --git a/pkgs/dropbear b/pkgs/dropbear @@ -1,8 +0,0 @@ -v="2014.63" -url="https://matt.ucc.asn.au/dropbear/releases/dropbear-$v.tar.bz2" - -build: crossmusl zlib - cd src/dropbear-$v - CC="$CC -static" ./configure --prefix="$root" --mandir="$root/share/man" - make -j$nprocs - make install diff --git a/pkgs/dropbear/build b/pkgs/dropbear/build @@ -0,0 +1,8 @@ +v="2014.63" +url="https://matt.ucc.asn.au/dropbear/releases/dropbear-$v.tar.bz2" + +build: crossmusl zlib + cd src/dropbear-$v + CC="$CC -static" ./configure --prefix="$root" --mandir="$root/share/man" + make -j$nprocs + make install diff --git a/pkgs/dvtm b/pkgs/dvtm @@ -1,11 +0,0 @@ -git="git://repo.or.cz/dvtm.git" - -build: ncurses - cd src/dvtm - make clean - sed -i "s@PREFIX = /usr/local@PREFIX = /@" config.mk - sed -i "s@INCS = -I. -I/usr/include -I/usr/local/include@INCS = -I. -I$libcroot/include -I$libcroot/include/ncursesw@" config.mk - sed -i "s@LDFLAGS += -L/usr/lib -L/usr/local/lib ${LIBS}@LDFLAGS += $LDFLAGS @" config.mk - sed -i "s@CC = cc@CC = $CC@" config.mk - make - make DESTDIR="$root" install diff --git a/pkgs/dvtm/build b/pkgs/dvtm/build @@ -0,0 +1,11 @@ +git="git://repo.or.cz/dvtm.git" + +build: ncurses + cd src/dvtm + make clean + sed -i "s@PREFIX = /usr/local@PREFIX = /@" config.mk + sed -i "s@INCS = -I. -I/usr/include -I/usr/local/include@INCS = -I. -I$libcroot/include -I$libcroot/include/ncursesw@" config.mk + sed -i "s@LDFLAGS += -L/usr/lib -L/usr/local/lib ${LIBS}@LDFLAGS += $LDFLAGS @" config.mk + sed -i "s@CC = cc@CC = $CC@" config.mk + make + make DESTDIR="$root" install diff --git a/pkgs/dwm b/pkgs/dwm @@ -1,12 +0,0 @@ -url="$mirror/dwm-git.tar.gz" - -build: tinyxlib - cd src/dwm - make clean - sed -i 's@PREFIX = /usr/local@PREFIX = @' config.mk - sed -i "s@X11INC = /usr/X11R6/include@X11INC = $libcroot/include @" config.mk - sed -i "s@X11LIB = /usr/X11R6/lib@X11LIB = $libcroot/lib @" config.mk - sed -i "s@LDFLAGS = -s ${LIBS}@LDFLAGS = $LDFLAGS ${LIBS} @" config.mk - sed -i "s@CC = cc@CC = $CC@" config.mk - make - make DESTDIR="$root" install diff --git a/pkgs/dwm/build b/pkgs/dwm/build @@ -0,0 +1,12 @@ +url="$mirror/dwm-git.tar.gz" + +build: tinyxlib + cd src/dwm + make clean + sed -i 's@PREFIX = /usr/local@PREFIX = @' config.mk + sed -i "s@X11INC = /usr/X11R6/include@X11INC = $libcroot/include @" config.mk + sed -i "s@X11LIB = /usr/X11R6/lib@X11LIB = $libcroot/lib @" config.mk + sed -i "s@LDFLAGS = -s ${LIBS}@LDFLAGS = $LDFLAGS ${LIBS} @" config.mk + sed -i "s@CC = cc@CC = $CC@" config.mk + make + make DESTDIR="$root" install diff --git a/pkgs/e2fsprogs b/pkgs/e2fsprogs @@ -1,29 +0,0 @@ -v="1.42.9" -url="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$v/e2fsprogs-$v.tar.gz" - -build: crossmusl - cd src/e2fsprogs-$v - CC="$CC -static" CFLAGS="-D__uint64_t=u_int64_t" ./configure --prefix="" --mandir="/usr/share/man" \ - --disable-nls - make -j$nprocs - make DESTDIR="$root" install install-libs - # ripped from sabotage: install libuuid, needed for cryptsetup - cd lib/uuid - make DESTDIR=$root install - rm -f $root/sbin/mkfs.ext2 - rm -f $root/sbin/mkfs.ext3 - rm -f $root/sbin/mkfs.ext4 - rm -f $root/sbin/mkfs.ext4dev - rm -f $root/sbin/fsck.ext2 - rm -f $root/sbin/fsck.ext3 - rm -f $root/sbin/fsck.ext4 - rm -f $root/sbin/fsck.ext4dev - cd "$root/bin" - ln -s mke2fs mkfs.ext2 - ln -s mke2fs mkfs.ext3 - ln -s mke2fs mkfs.ext4 - ln -s mke2fs mkfs.ext4dev - ln -s e2fsck fsck.ext2 - ln -s e2fsck fsck.ext3 - ln -s e2fsck fsck.ext4 - ln -s e2fsck fsck.ext4dev diff --git a/pkgs/e2fsprogs/build b/pkgs/e2fsprogs/build @@ -0,0 +1,29 @@ +v="1.42.9" +url="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v$v/e2fsprogs-$v.tar.gz" + +build: crossmusl + cd src/e2fsprogs-$v + CC="$CC -static" CFLAGS="-D__uint64_t=u_int64_t" ./configure --prefix="" --mandir="/usr/share/man" \ + --disable-nls + make -j$nprocs + make DESTDIR="$root" install install-libs + # ripped from sabotage: install libuuid, needed for cryptsetup + cd lib/uuid + make DESTDIR=$root install + rm -f $root/sbin/mkfs.ext2 + rm -f $root/sbin/mkfs.ext3 + rm -f $root/sbin/mkfs.ext4 + rm -f $root/sbin/mkfs.ext4dev + rm -f $root/sbin/fsck.ext2 + rm -f $root/sbin/fsck.ext3 + rm -f $root/sbin/fsck.ext4 + rm -f $root/sbin/fsck.ext4dev + cd "$root/bin" + ln -s mke2fs mkfs.ext2 + ln -s mke2fs mkfs.ext3 + ln -s mke2fs mkfs.ext4 + ln -s mke2fs mkfs.ext4dev + ln -s e2fsck fsck.ext2 + ln -s e2fsck fsck.ext3 + ln -s e2fsck fsck.ext4 + ln -s e2fsck fsck.ext4dev diff --git a/pkgs/extlinux b/pkgs/extlinux @@ -1,2 +0,0 @@ -build: prepare_root - cp "$top/stuff/extlinux.conf" "$root/boot" diff --git a/pkgs/extlinux/build b/pkgs/extlinux/build @@ -0,0 +1,2 @@ +build: prepare_root + cp "$top/stuff/extlinux.conf" "$root/boot" diff --git a/pkgs/file b/pkgs/file @@ -1,99 +0,0 @@ -v="5.17" -url="$mirror/file-$v.tar.gz" - -build: crossmusl zlib - set -x - cd src/file-$v/src - rm -rf *.o file ../magic/magic.mgc ../magic/magic - CFLAGS="-DBUILTIN_ELF=1 \ - -DELFCORE=1 \ - -DHAVE_ASCTIME_R=1 \ - -DHAVE_ASPRINTF=1 \ - -DHAVE_CTIME_R=1 \ - -DHAVE_DAYLIGHT=1 \ - -DHAVE_DECL_DAYLIGHT=1 \ - -DHAVE_DECL_TZNAME=1 \ - -DHAVE_DLFCN_H=1 \ - -DHAVE_ERR_H=1 \ - -DHAVE_FCNTL_H=1 \ - -DHAVE_FORK=1 \ - -DHAVE_FSEEKO=1 \ - -DHAVE_GETLINE=1 \ - -DHAVE_GETOPT_H=1 \ - -DHAVE_GETOPT_LONG=1 \ - -DHAVE_GETPAGESIZE=1 \ - -DHAVE_INTTYPES_H=1 \ - -DHAVE_LIBZ=1 \ - -DHAVE_LIMITS_H=1 \ - -DHAVE_LOCALE_H=1 \ - -DHAVE_MBRTOWC=1 \ - -DHAVE_MBSTATE_T=1 \ - -DHAVE_MEMORY_H=1 \ - -DHAVE_MKOSTEMP=1 \ - -DHAVE_MKSTEMP=1 \ - -DHAVE_MMAP=1 \ - -DHAVE_PREAD=1 \ - -DHAVE_STDDEF_H=1 \ - -DHAVE_STDINT_H=1 \ - -DHAVE_STDLIB_H=1 \ - -DHAVE_STRCASESTR=1 \ - -DHAVE_STRERROR=1 \ - -DHAVE_STRINGS_H=1 \ - -DHAVE_STRING_H=1 \ - -DHAVE_STRNDUP=1 \ - -DHAVE_STRTOF=1 \ - -DHAVE_STRTOUL=1 \ - -DHAVE_STRUCT_OPTION=1 \ - -DHAVE_STRUCT_STAT_ST_RDEV=1 \ - -DHAVE_STRUCT_TM_TM_ZONE=1 \ - -DHAVE_SYS_MMAN_H=1 \ - -DHAVE_SYS_PARAM_H=1 \ - -DHAVE_SYS_STAT_H=1 \ - -DHAVE_SYS_TIME_H=1 \ - -DHAVE_SYS_TYPES_H=1 \ - -DHAVE_SYS_WAIT_H=1 \ - -DHAVE_TM_ISDST=1 \ - -DHAVE_TM_ZONE=1 \ - -DHAVE_TZNAME=1 \ - -DHAVE_UNISTD_H=1 \ - -DHAVE_UTIME=1 \ - -DHAVE_UTIMES=1 \ - -DHAVE_UTIME_H=1 \ - -DHAVE_VASPRINTF=1 \ - -DHAVE_VFORK=1 \ - -DHAVE_VISIBILITY=1 \ - -DHAVE_WCHAR_H=1 \ - -DHAVE_WCTYPE_H=1 \ - -DHAVE_WCWIDTH=1 \ - -DHAVE_WORKING_FORK=1 \ - -DHAVE_WORKING_VFORK=1 \ - -DHAVE_ZLIB_H=1 \ - -DPACKAGE=\"file\" \ - -DPACKAGE_BUGREPORT=\"christos@astron.com\" \ - -DPACKAGE_NAME=\"file\" \ - -DPACKAGE_TARNAME=\"file\" \ - -DPACKAGE_URL=\"\" \ - -DPACKAGE_VERSION=\"$v\" \ - -DSTDC_HEADERS=1 \ - -D_ALL_SOURCE=1 \ - -D_GNU_SOURCE=1 \ - -D_POSIX_PTHREAD_SEMANTICS=1 \ - -D_TANDEM_SOURCE=1 \ - -D__EXTENSIONS__=1 \ - -DVERSION=\"$v\"" - printf "\n#ifndef _INTPTR_T_DEFINED\n#define _INTPTR_T_DEFINED\n#define intptr_t int\n#endif\n" > strcasestr.c.tmp - cat strcasestr.c >> strcasestr.c.tmp - mv strcasestr.c.tmp strcasestr.c - sed -e "s/X.YY/$(echo $v | sed -e "s|\.||g")/" < magic.h.in > magic.h - MAGIC='"/share/file/magic"' - for f in *.c; do - $CC -c $f $LOCAL_CFLAGS $CFLAGS -DPACKAGE_STRING="file $v" -DMAGIC="$MAGIC" - done - $CC -o file *.o -lz $LDFLAGS - cd ../magic - mkdir -p magic - cp Header Localstuff Magdir/* magic/ - ../src/file -C -m magic - mkdir -p "$root/share/file" - cp magic.mgc "$root/share/file" - cp ../src/file "$root/bin" diff --git a/pkgs/file/build b/pkgs/file/build @@ -0,0 +1,99 @@ +v="5.17" +url="$mirror/file-$v.tar.gz" + +build: crossmusl zlib + set -x + cd src/file-$v/src + rm -rf *.o file ../magic/magic.mgc ../magic/magic + CFLAGS="-DBUILTIN_ELF=1 \ + -DELFCORE=1 \ + -DHAVE_ASCTIME_R=1 \ + -DHAVE_ASPRINTF=1 \ + -DHAVE_CTIME_R=1 \ + -DHAVE_DAYLIGHT=1 \ + -DHAVE_DECL_DAYLIGHT=1 \ + -DHAVE_DECL_TZNAME=1 \ + -DHAVE_DLFCN_H=1 \ + -DHAVE_ERR_H=1 \ + -DHAVE_FCNTL_H=1 \ + -DHAVE_FORK=1 \ + -DHAVE_FSEEKO=1 \ + -DHAVE_GETLINE=1 \ + -DHAVE_GETOPT_H=1 \ + -DHAVE_GETOPT_LONG=1 \ + -DHAVE_GETPAGESIZE=1 \ + -DHAVE_INTTYPES_H=1 \ + -DHAVE_LIBZ=1 \ + -DHAVE_LIMITS_H=1 \ + -DHAVE_LOCALE_H=1 \ + -DHAVE_MBRTOWC=1 \ + -DHAVE_MBSTATE_T=1 \ + -DHAVE_MEMORY_H=1 \ + -DHAVE_MKOSTEMP=1 \ + -DHAVE_MKSTEMP=1 \ + -DHAVE_MMAP=1 \ + -DHAVE_PREAD=1 \ + -DHAVE_STDDEF_H=1 \ + -DHAVE_STDINT_H=1 \ + -DHAVE_STDLIB_H=1 \ + -DHAVE_STRCASESTR=1 \ + -DHAVE_STRERROR=1 \ + -DHAVE_STRINGS_H=1 \ + -DHAVE_STRING_H=1 \ + -DHAVE_STRNDUP=1 \ + -DHAVE_STRTOF=1 \ + -DHAVE_STRTOUL=1 \ + -DHAVE_STRUCT_OPTION=1 \ + -DHAVE_STRUCT_STAT_ST_RDEV=1 \ + -DHAVE_STRUCT_TM_TM_ZONE=1 \ + -DHAVE_SYS_MMAN_H=1 \ + -DHAVE_SYS_PARAM_H=1 \ + -DHAVE_SYS_STAT_H=1 \ + -DHAVE_SYS_TIME_H=1 \ + -DHAVE_SYS_TYPES_H=1 \ + -DHAVE_SYS_WAIT_H=1 \ + -DHAVE_TM_ISDST=1 \ + -DHAVE_TM_ZONE=1 \ + -DHAVE_TZNAME=1 \ + -DHAVE_UNISTD_H=1 \ + -DHAVE_UTIME=1 \ + -DHAVE_UTIMES=1 \ + -DHAVE_UTIME_H=1 \ + -DHAVE_VASPRINTF=1 \ + -DHAVE_VFORK=1 \ + -DHAVE_VISIBILITY=1 \ + -DHAVE_WCHAR_H=1 \ + -DHAVE_WCTYPE_H=1 \ + -DHAVE_WCWIDTH=1 \ + -DHAVE_WORKING_FORK=1 \ + -DHAVE_WORKING_VFORK=1 \ + -DHAVE_ZLIB_H=1 \ + -DPACKAGE=\"file\" \ + -DPACKAGE_BUGREPORT=\"christos@astron.com\" \ + -DPACKAGE_NAME=\"file\" \ + -DPACKAGE_TARNAME=\"file\" \ + -DPACKAGE_URL=\"\" \ + -DPACKAGE_VERSION=\"$v\" \ + -DSTDC_HEADERS=1 \ + -D_ALL_SOURCE=1 \ + -D_GNU_SOURCE=1 \ + -D_POSIX_PTHREAD_SEMANTICS=1 \ + -D_TANDEM_SOURCE=1 \ + -D__EXTENSIONS__=1 \ + -DVERSION=\"$v\"" + printf "\n#ifndef _INTPTR_T_DEFINED\n#define _INTPTR_T_DEFINED\n#define intptr_t int\n#endif\n" > strcasestr.c.tmp + cat strcasestr.c >> strcasestr.c.tmp + mv strcasestr.c.tmp strcasestr.c + sed -e "s/X.YY/$(echo $v | sed -e "s|\.||g")/" < magic.h.in > magic.h + MAGIC='"/share/file/magic"' + for f in *.c; do + $CC -c $f $LOCAL_CFLAGS $CFLAGS -DPACKAGE_STRING="file $v" -DMAGIC="$MAGIC" + done + $CC -o file *.o -lz $LDFLAGS + cd ../magic + mkdir -p magic + cp Header Localstuff Magdir/* magic/ + ../src/file -C -m magic + mkdir -p "$root/share/file" + cp magic.mgc "$root/share/file" + cp ../src/file "$root/bin" diff --git a/pkgs/fs b/pkgs/fs @@ -1,5 +0,0 @@ -git="git://git.2f30.org/fs" - -build: prepare_root - cd src/fs - cp -r * "$root/" diff --git a/pkgs/fs/build b/pkgs/fs/build @@ -0,0 +1,5 @@ +git="git://git.2f30.org/fs" + +build: prepare_root + cd src/fs + cp -r * "$root/" diff --git a/pkgs/jupp b/pkgs/jupp @@ -1,19 +0,0 @@ -v="3.1jupp26" -url="$mirror/joe-$v.tgz" - -build: crossmusl - cd src/jupp - CC=$CC sh configure --prefix="/" - make -j$nprocs - cp joe termidx "$root/bin" - mkdir -p "$root/share/man/man1" - cp joe.1 "$root/share/man/man1" - mkdir -p "$root/etc/joe/charmaps" - cp charmaps/klingon "$root/etc/joe/charmaps" - cp joerc jmacsrc "$root/etc/joe" - mkdir -p "$root/etc/joe/syntax" - cp syntax/* "$root/etc/joe/syntax" - cd "$root/bin" - ln -sf joe jmacs - cd "$root/share/man/man1" - ln -sf joe.1 jmacs.1 diff --git a/pkgs/jupp/build b/pkgs/jupp/build @@ -0,0 +1,19 @@ +v="3.1jupp26" +url="$mirror/joe-$v.tgz" + +build: crossmusl + cd src/jupp + CC=$CC sh configure --prefix="/" + make -j$nprocs + cp joe termidx "$root/bin" + mkdir -p "$root/share/man/man1" + cp joe.1 "$root/share/man/man1" + mkdir -p "$root/etc/joe/charmaps" + cp charmaps/klingon "$root/etc/joe/charmaps" + cp joerc jmacsrc "$root/etc/joe" + mkdir -p "$root/etc/joe/syntax" + cp syntax/* "$root/etc/joe/syntax" + cd "$root/bin" + ln -sf joe jmacs + cd "$root/share/man/man1" + ln -sf joe.1 jmacs.1 diff --git a/pkgs/kernel b/pkgs/kernel @@ -1,18 +0,0 @@ -v="3.10.32" -url="$mirror/kernel.tar.gz" - -build: crossmusl - cd src/linux-$v - cp "$top/stuff/kernel-config-$arch" .config - case "$arch" in - x86_64) - A=x86_64 - ;; - i486) - A=x86 - ;; - esac - make ARCH="$A" bzImage -j$nprocs - cp arch/x86/boot/bzImage "$root/boot" - cp .config "$root/boot/bzImage.config" - cp System.map "$root/boot" diff --git a/pkgs/kernel/build b/pkgs/kernel/build @@ -0,0 +1,18 @@ +v="3.10.32" +url="$mirror/kernel.tar.gz" + +build: crossmusl + cd src/linux-$v + cp "$top/stuff/kernel-config-$arch" .config + case "$arch" in + x86_64) + A=x86_64 + ;; + i486) + A=x86 + ;; + esac + make ARCH="$A" bzImage -j$nprocs + cp arch/x86/boot/bzImage "$root/boot" + cp .config "$root/boot/bzImage.config" + cp System.map "$root/boot" diff --git a/pkgs/libevent b/pkgs/libevent @@ -1,8 +0,0 @@ -v="2.0.21" -url="$mirror/libevent-$v-stable.tar.gz" - -build: crossmusl - cd src/libevent-$v-stable - CC="$CC -static" ./configure --prefix="$libcroot" --disable-shared --enable-static - make -j$nprocs - make install diff --git a/pkgs/libevent/build b/pkgs/libevent/build @@ -0,0 +1,8 @@ +v="2.0.21" +url="$mirror/libevent-$v-stable.tar.gz" + +build: crossmusl + cd src/libevent-$v-stable + CC="$CC -static" ./configure --prefix="$libcroot" --disable-shared --enable-static + make -j$nprocs + make install diff --git a/pkgs/linux_fw b/pkgs/linux_fw @@ -1,9 +0,0 @@ -git="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" - -build: crossmusl - cd src/linux_fw - mkdir -p "$root/lib/firmware" - cp -r * "$root/lib/firmware" - rm -f "$root/lib/firmware/WHENCE" - rm -f "$root/lib/firmware/"LICENSE.* - rm -f "$root/lib/firmware/"LICENCE.* diff --git a/pkgs/linux_fw/build b/pkgs/linux_fw/build @@ -0,0 +1,9 @@ +git="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git" + +build: crossmusl + cd src/linux_fw + mkdir -p "$root/lib/firmware" + cp -r * "$root/lib/firmware" + rm -f "$root/lib/firmware/WHENCE" + rm -f "$root/lib/firmware/"LICENSE.* + rm -f "$root/lib/firmware/"LICENCE.* diff --git a/pkgs/make b/pkgs/make @@ -1,8 +0,0 @@ -v="3.82" -url="$mirror/make-$v.tar.bz2" - -build: crossmusl - cd src/make-$v - CC="$CC -static" ./configure --prefix="$root" --disable-nls - make -j$nprocs - make install diff --git a/pkgs/make/build b/pkgs/make/build @@ -0,0 +1,8 @@ +v="3.82" +url="$mirror/make-$v.tar.bz2" + +build: crossmusl + cd src/make-$v + CC="$CC -static" ./configure --prefix="$root" --disable-nls + make -j$nprocs + make install diff --git a/pkgs/man b/pkgs/man @@ -1,7 +0,0 @@ -url="$mirror/man.tar.gz" - -build: crossmusl - set -x - cd src/man - $CC -std=gnu99 -o man man.c $CFLAGS $LDFLAGS - cp man "$root/bin" diff --git a/pkgs/man/build b/pkgs/man/build @@ -0,0 +1,7 @@ +url="$mirror/man.tar.gz" + +build: crossmusl + set -x + cd src/man + $CC -std=gnu99 -o man man.c $CFLAGS $LDFLAGS + cp man "$root/bin" diff --git a/pkgs/mksh b/pkgs/mksh @@ -1,79 +0,0 @@ -v="R47" -url="$mirror/mksh-$v.tar.gz" - -build: crossmusl - set -x - cd src/mksh - cat > signames.inc << EOF - { "INT", 2 }, - { "SEGV", 11 }, - { "ABRT", 6 }, - { "KILL", 9 }, - { "ALRM", 14 }, - { "BUS", 7 }, - { "CHLD", 17 }, - { "CONT", 18 }, - { "FPE", 8 }, - { "HUP", 1 }, - { "ILL", 4 }, - { "IO", 29 }, - { "PIPE", 13 }, - { "PROF", 27 }, - { "PWR", 30 }, - { "QUIT", 3 }, - { "STOP", 19 }, - { "SYS", 31 }, - { "TERM", 15 }, - { "TRAP", 5 }, - { "TSTP", 20 }, - { "TTIN", 21 }, - { "TTOU", 22 }, - { "URG", 23 }, - { "USR1", 10 }, - { "USR2", 12 }, - { "VTALRM", 26 }, - { "WINCH", 28 }, - { "XCPU", 24 }, - { "XFSZ", 25 }, - { "STKFLT", 16 }, - EOF - LOCAL_CFLAGS="\ - -I. -DMKSH_BUILDSH -D_GNU_SOURCE -DSETUID_CAN_FAIL_WITH_EAGAIN -DHAVE_ATTRIBUTE_BOUNDED=0 \ - -DHAVE_ATTRIBUTE_FORMAT=1 -DHAVE_ATTRIBUTE_NORETURN=1 -DHAVE_ATTRIBUTE_UNUSED=1 -DHAVE_ATTRIBUTE_USED=1 \ - -DHAVE_SYS_TIME_H=1 -DHAVE_TIME_H=1 -DHAVE_BOTH_TIME_H=1 -DHAVE_SYS_BSDTYPES_H=0 -DHAVE_SYS_FILE_H=1 \ - -DHAVE_SYS_MKDEV_H=0 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_SELECT_H=1 \ - -DHAVE_SYS_SYSMACROS_H=1 -DHAVE_BSTRING_H=0 -DHAVE_GRP_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_LIBUTIL_H=0 \ - -DHAVE_PATHS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_ULIMIT_H=1 -DHAVE_VALUES_H=1 \ - -DHAVE_CAN_INTTYPES=1 -DHAVE_CAN_UCBINTS=1 -DHAVE_CAN_INT8TYPE=1 -DHAVE_CAN_UCBINT8=1 -DHAVE_RLIM_T=1 \ - -DHAVE_SIG_T=1 -DHAVE_SYS_ERRLIST=0 -DHAVE_SYS_SIGNAME=0 -DHAVE_SYS_SIGLIST=0 -DHAVE_FLOCK=1 \ - -DHAVE_LOCK_FCNTL=1 -DHAVE_GETRUSAGE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_KILLPG=1 -DHAVE_MEMMOVE=1 \ - -DHAVE_MKNOD=0 -DHAVE_MMAP=1 -DHAVE_NICE=1 -DHAVE_REVOKE=0 -DHAVE_SETLOCALE_CTYPE=1 \ - -DHAVE_LANGINFO_CODESET=1 -DHAVE_SELECT=1 -DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRERROR=1 \ - -DHAVE_STRSIGNAL=1 -DHAVE_STRLCPY=1 -DHAVE_FLOCK_DECL=1 -DHAVE_REVOKE_DECL=1 -DHAVE_SYS_ERRLIST_DECL=0 \ - -DHAVE_SYS_SIGLIST_DECL=0 -DHAVE_PERSISTENT_HISTORY=1 -DMKSH_BUILD_R=471" - SRC="\ - edit.c \ - eval.c \ - exec.c \ - expr.c \ - funcs.c \ - histrap.c \ - jobs.c \ - lalloc.c \ - lex.c \ - main.c \ - misc.c \ - shf.c \ - strlcpy.c \ - syn.c \ - tree.c \ - var.c" - for f in $SRC; do - $CC -c $f -o "${f%%.c}.o" $CFLAGS $LOCAL_CFLAGS - done - $CC -o mksh *.o $LDFLAGS - cp mksh "$root/bin" - mkdir -p "$root/share/man/man1" - cp mksh.1 "$root/share/man/man1/mksh.1" - cd "$root/bin" - ln -sf mksh sh diff --git a/pkgs/mksh/build b/pkgs/mksh/build @@ -0,0 +1,79 @@ +v="R47" +url="$mirror/mksh-$v.tar.gz" + +build: crossmusl + set -x + cd src/mksh + cat > signames.inc << EOF + { "INT", 2 }, + { "SEGV", 11 }, + { "ABRT", 6 }, + { "KILL", 9 }, + { "ALRM", 14 }, + { "BUS", 7 }, + { "CHLD", 17 }, + { "CONT", 18 }, + { "FPE", 8 }, + { "HUP", 1 }, + { "ILL", 4 }, + { "IO", 29 }, + { "PIPE", 13 }, + { "PROF", 27 }, + { "PWR", 30 }, + { "QUIT", 3 }, + { "STOP", 19 }, + { "SYS", 31 }, + { "TERM", 15 }, + { "TRAP", 5 }, + { "TSTP", 20 }, + { "TTIN", 21 }, + { "TTOU", 22 }, + { "URG", 23 }, + { "USR1", 10 }, + { "USR2", 12 }, + { "VTALRM", 26 }, + { "WINCH", 28 }, + { "XCPU", 24 }, + { "XFSZ", 25 }, + { "STKFLT", 16 }, + EOF + LOCAL_CFLAGS="\ + -I. -DMKSH_BUILDSH -D_GNU_SOURCE -DSETUID_CAN_FAIL_WITH_EAGAIN -DHAVE_ATTRIBUTE_BOUNDED=0 \ + -DHAVE_ATTRIBUTE_FORMAT=1 -DHAVE_ATTRIBUTE_NORETURN=1 -DHAVE_ATTRIBUTE_UNUSED=1 -DHAVE_ATTRIBUTE_USED=1 \ + -DHAVE_SYS_TIME_H=1 -DHAVE_TIME_H=1 -DHAVE_BOTH_TIME_H=1 -DHAVE_SYS_BSDTYPES_H=0 -DHAVE_SYS_FILE_H=1 \ + -DHAVE_SYS_MKDEV_H=0 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_SELECT_H=1 \ + -DHAVE_SYS_SYSMACROS_H=1 -DHAVE_BSTRING_H=0 -DHAVE_GRP_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_LIBUTIL_H=0 \ + -DHAVE_PATHS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_ULIMIT_H=1 -DHAVE_VALUES_H=1 \ + -DHAVE_CAN_INTTYPES=1 -DHAVE_CAN_UCBINTS=1 -DHAVE_CAN_INT8TYPE=1 -DHAVE_CAN_UCBINT8=1 -DHAVE_RLIM_T=1 \ + -DHAVE_SIG_T=1 -DHAVE_SYS_ERRLIST=0 -DHAVE_SYS_SIGNAME=0 -DHAVE_SYS_SIGLIST=0 -DHAVE_FLOCK=1 \ + -DHAVE_LOCK_FCNTL=1 -DHAVE_GETRUSAGE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_KILLPG=1 -DHAVE_MEMMOVE=1 \ + -DHAVE_MKNOD=0 -DHAVE_MMAP=1 -DHAVE_NICE=1 -DHAVE_REVOKE=0 -DHAVE_SETLOCALE_CTYPE=1 \ + -DHAVE_LANGINFO_CODESET=1 -DHAVE_SELECT=1 -DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRERROR=1 \ + -DHAVE_STRSIGNAL=1 -DHAVE_STRLCPY=1 -DHAVE_FLOCK_DECL=1 -DHAVE_REVOKE_DECL=1 -DHAVE_SYS_ERRLIST_DECL=0 \ + -DHAVE_SYS_SIGLIST_DECL=0 -DHAVE_PERSISTENT_HISTORY=1 -DMKSH_BUILD_R=471" + SRC="\ + edit.c \ + eval.c \ + exec.c \ + expr.c \ + funcs.c \ + histrap.c \ + jobs.c \ + lalloc.c \ + lex.c \ + main.c \ + misc.c \ + shf.c \ + strlcpy.c \ + syn.c \ + tree.c \ + var.c" + for f in $SRC; do + $CC -c $f -o "${f%%.c}.o" $CFLAGS $LOCAL_CFLAGS + done + $CC -o mksh *.o $LDFLAGS + cp mksh "$root/bin" + mkdir -p "$root/share/man/man1" + cp mksh.1 "$root/share/man/man1/mksh.1" + cd "$root/bin" + ln -sf mksh sh diff --git a/pkgs/mpg123 b/pkgs/mpg123 @@ -1,17 +0,0 @@ -v="1.18.0" -url="$mirror/mpg123-$v.tar.bz2" - -build: tinyalsa - cd src/mpg123-$v - case "$arch" in - x86_64) - A=x86-64 - ;; - i486) - A=x86 - ;; - esac - CC=$CC ./configure --prefix="$root" --with-default-audio=tinyalsa \ - --enable-static=yes --enable-shared=no --with-cpu="$A" - make -j$nprocs - make install diff --git a/pkgs/mpg123/build b/pkgs/mpg123/build @@ -0,0 +1,17 @@ +v="1.18.0" +url="$mirror/mpg123-$v.tar.bz2" + +build: tinyalsa + cd src/mpg123-$v + case "$arch" in + x86_64) + A=x86-64 + ;; + i486) + A=x86 + ;; + esac + CC=$CC ./configure --prefix="$root" --with-default-audio=tinyalsa \ + --enable-static=yes --enable-shared=no --with-cpu="$A" + make -j$nprocs + make install diff --git a/pkgs/ncurses b/pkgs/ncurses @@ -1,18 +0,0 @@ -v="5.9" -url="$mirror/ncurses.tar.gz" - -build: crossmusl - cd src/ncurses-$v - cp $top/stuff/ncurses-fallback.c ncurses/fallback.c - CC="$CC -static" ./configure --prefix="$libcroot" --mandir="$root/share" \ - --datadir="$root/share" --without-tests \ - --with-normal --enable-sigwinch --disable-nls --without-dlsym \ - --without-cxx-binding --enable-widec \ - --with-fallbacks="linux vt100 xterm xterm256-color" </dev/ptmx - make -j$nprocs - make install - cd "$root/lib" - for lib in ncurses form panel menu ; do - ln -sf lib${lib}w_g.a lib${lib}_g.a - ln -sf lib${lib}w.a lib${lib}.a - done diff --git a/pkgs/ncurses/build b/pkgs/ncurses/build @@ -0,0 +1,18 @@ +v="5.9" +url="$mirror/ncurses.tar.gz" + +build: crossmusl + cd src/ncurses-$v + cp $top/stuff/ncurses-fallback.c ncurses/fallback.c + CC="$CC -static" ./configure --prefix="$libcroot" --mandir="$root/share" \ + --datadir="$root/share" --without-tests \ + --with-normal --enable-sigwinch --disable-nls --without-dlsym \ + --without-cxx-binding --enable-widec \ + --with-fallbacks="linux vt100 xterm xterm256-color" </dev/ptmx + make -j$nprocs + make install + cd "$root/lib" + for lib in ncurses form panel menu ; do + ln -sf lib${lib}w_g.a lib${lib}_g.a + ln -sf lib${lib}w.a lib${lib}.a + done diff --git a/pkgs/prepare_root b/pkgs/prepare_root @@ -1,17 +0,0 @@ -build: - mkdir -p "$root" - cd "$root" - mkdir -p boot bin dev emul etc home mnt opt proc root share src sys tmp var - mkdir -p opt/cross share/doc share/fonts/encodings share/man share/terminfo var/empty var/log var/run - rm -f include - ln -s "opt/cross/$arch-linux-musl/$arch-linux-musl/include" include - rm -f lib - ln -s "opt/cross/$arch-linux-musl/$arch-linux-musl/lib" lib - rm -f usr - ln -s . usr - rm -f sbin - ln -s bin sbin - rm -f var/tmp - ln -s ../tmp var/tmp - chmod 1777 tmp - chmod 700 root diff --git a/pkgs/prepare_root/build b/pkgs/prepare_root/build @@ -0,0 +1,17 @@ +build: + mkdir -p "$root" + cd "$root" + mkdir -p boot bin dev emul etc home mnt opt proc root share src sys tmp var + mkdir -p opt/cross share/doc share/fonts/encodings share/man share/terminfo var/empty var/log var/run + rm -f include + ln -s "opt/cross/$arch-linux-musl/$arch-linux-musl/include" include + rm -f lib + ln -s "opt/cross/$arch-linux-musl/$arch-linux-musl/lib" lib + rm -f usr + ln -s . usr + rm -f sbin + ln -s bin sbin + rm -f var/tmp + ln -s ../tmp var/tmp + chmod 1777 tmp + chmod 700 root diff --git a/pkgs/quark b/pkgs/quark @@ -1,10 +0,0 @@ -git="git://git.suckless.org/quark" - -build: crossmusl - set -x - cd src/quark - git am -3 "$top/stuff/0002-remove-unused-code.patch" - git am -3 "$top/stuff/0003-implement-http-not-modified.patch" - cp config.def.h config.h - $CC -o quark quark.c -DVERSION=\"0.1\" $CFLAGS $LDFLAGS - cp quark "$root/bin" diff --git a/pkgs/quark/build b/pkgs/quark/build @@ -0,0 +1,10 @@ +git="git://git.suckless.org/quark" + +build: crossmusl + set -x + cd src/quark + git am -3 "$top/stuff/0002-remove-unused-code.patch" + git am -3 "$top/stuff/0003-implement-http-not-modified.patch" + cp config.def.h config.h + $CC -o quark quark.c -DVERSION=\"0.1\" $CFLAGS $LDFLAGS + cp quark "$root/bin" diff --git a/pkgs/rsync b/pkgs/rsync @@ -1,8 +0,0 @@ -v="3.0.9" -url="$mirror/rsync-$v.tar.gz" - -build: crossmusl - cd src/rsync-$v - CC=$CC ./configure --prefix="$root" - make -j$nprocs - make install diff --git a/pkgs/rsync/build b/pkgs/rsync/build @@ -0,0 +1,8 @@ +v="3.0.9" +url="$mirror/rsync-$v.tar.gz" + +build: crossmusl + cd src/rsync-$v + CC=$CC ./configure --prefix="$root" + make -j$nprocs + make install diff --git a/pkgs/sbase b/pkgs/sbase @@ -1,30 +0,0 @@ -git="git://git.2f30.org/sbase" - -build: crossmusl - set -x - cd src/sbase - for f in util/*.c; do - $CC -c $f -o "${f%%.c}.o" $CFLAGS - done - for f in util/*.o; do - ar -r -c util.a $f - done - ranlib util.a - for f in *.c; do - $CC -c $f $CFLAGS - done - for f in *.o; do - $CC -o "${f%.*}" $f util.a $LDFLAGS - done - for f in *.o; do - cp "${f%.*}" "$root/bin" - done - mkdir -p "$root/share/man/man1" - for f in *.1; do - cp $f "$root/share/man/man1" - done - # these are still buggy - for f in grep cp tar ; do - rm "$root/bin/$f" - rm "$root/share/man/man1/$f.1" - done diff --git a/pkgs/sbase/build b/pkgs/sbase/build @@ -0,0 +1,30 @@ +git="git://git.2f30.org/sbase" + +build: crossmusl + set -x + cd src/sbase + for f in util/*.c; do + $CC -c $f -o "${f%%.c}.o" $CFLAGS + done + for f in util/*.o; do + ar -r -c util.a $f + done + ranlib util.a + for f in *.c; do + $CC -c $f $CFLAGS + done + for f in *.o; do + $CC -o "${f%.*}" $f util.a $LDFLAGS + done + for f in *.o; do + cp "${f%.*}" "$root/bin" + done + mkdir -p "$root/share/man/man1" + for f in *.1; do + cp $f "$root/share/man/man1" + done + # these are still buggy + for f in grep cp tar ; do + rm "$root/bin/$f" + rm "$root/share/man/man1/$f.1" + done diff --git a/pkgs/sdhcp b/pkgs/sdhcp @@ -1,9 +0,0 @@ -git="git://git.2f30.org/sdhcp" - -build: crossmusl - set -x - cd src/sdhcp - $CC -o sdhcp sdhcp.c $CFLAGS $LDFLAGS - cp sdhcp "$root/bin" - mkdir -p "$root/share/man/man8" - cp sdhcp.8 "$root/share/man/man8" diff --git a/pkgs/sdhcp/build b/pkgs/sdhcp/build @@ -0,0 +1,9 @@ +git="git://git.2f30.org/sdhcp" + +build: crossmusl + set -x + cd src/sdhcp + $CC -o sdhcp sdhcp.c $CFLAGS $LDFLAGS + cp sdhcp "$root/bin" + mkdir -p "$root/share/man/man8" + cp sdhcp.8 "$root/share/man/man8" diff --git a/pkgs/sic b/pkgs/sic @@ -1,7 +0,0 @@ -url="$mirror/sic.tar.gz" - -build: crossmusl - cd src/sic - make clean - make CC=$CC LDFLAGS="$LDFLAGS" - cp sic "$root/bin" diff --git a/pkgs/sic/build b/pkgs/sic/build @@ -0,0 +1,7 @@ +url="$mirror/sic.tar.gz" + +build: crossmusl + cd src/sic + make clean + make CC=$CC LDFLAGS="$LDFLAGS" + cp sic "$root/bin" diff --git a/pkgs/sinit b/pkgs/sinit @@ -1,10 +0,0 @@ -git="git://git.2f30.org/sinit" - -build: crossmusl - set -x - cd src/sinit - cp config.def.h config.h - $CC -o sinit sinit.c $CFLAGS $LDFLAGS - cp sinit "$root/bin" - cd "$root/bin" - ln -sf sinit init diff --git a/pkgs/sinit/build b/pkgs/sinit/build @@ -0,0 +1,10 @@ +git="git://git.2f30.org/sinit" + +build: crossmusl + set -x + cd src/sinit + cp config.def.h config.h + $CC -o sinit sinit.c $CFLAGS $LDFLAGS + cp sinit "$root/bin" + cd "$root/bin" + ln -sf sinit init diff --git a/pkgs/smdev b/pkgs/smdev @@ -1,22 +0,0 @@ -git="git://git.2f30.org/smdev" - -build: crossmusl - set -x - cd src/smdev - cp config.def.h config.h - for f in util/*.c; do - $CC -c $f -o "${f%%.c}.o" $CFLAGS - done - for f in util/*.o; do - ar -r -c util.a $f - done - ranlib util.a - for f in *.c; do - $CC -c $f $CFLAGS - done - for f in *.o; do - $CC -o "${f%.*}" $f util.a $LDFLAGS - done - for f in *.o; do - cp "${f%.*}" "$root/bin" - done diff --git a/pkgs/smdev/build b/pkgs/smdev/build @@ -0,0 +1,22 @@ +git="git://git.2f30.org/smdev" + +build: crossmusl + set -x + cd src/smdev + cp config.def.h config.h + for f in util/*.c; do + $CC -c $f -o "${f%%.c}.o" $CFLAGS + done + for f in util/*.o; do + ar -r -c util.a $f + done + ranlib util.a + for f in *.c; do + $CC -c $f $CFLAGS + done + for f in *.o; do + $CC -o "${f%.*}" $f util.a $LDFLAGS + done + for f in *.o; do + cp "${f%.*}" "$root/bin" + done diff --git a/pkgs/stage0 b/pkgs/stage0 @@ -1 +0,0 @@ -build: 9base busybox crossmusl file fs make man mksh prepare_root sbase sinit smdev ubase zlib diff --git a/pkgs/stage0/build b/pkgs/stage0/build @@ -0,0 +1 @@ +build: 9base busybox crossmusl file fs make man mksh prepare_root sbase sinit smdev ubase zlib diff --git a/pkgs/terminus b/pkgs/terminus @@ -1,15 +0,0 @@ -v="4.38" -url="$mirror/terminus-font-$v.tar.gz" - -build: crossmusl - cd src/terminus-font-$v - sh configure --psfdir="$root/share/fonts/console" \ - --x11dir="$root/share/fonts/misc" - make -j$nprocs - make DESTDIR=/ install - cd "$root/share/fonts/misc" - gzip -d *.gz - mkfontscale - mkfontdir - cd "$root/share/fonts/console" - gzip -d *.gz diff --git a/pkgs/terminus/build b/pkgs/terminus/build @@ -0,0 +1,15 @@ +v="4.38" +url="$mirror/terminus-font-$v.tar.gz" + +build: crossmusl + cd src/terminus-font-$v + sh configure --psfdir="$root/share/fonts/console" \ + --x11dir="$root/share/fonts/misc" + make -j$nprocs + make DESTDIR=/ install + cd "$root/share/fonts/misc" + gzip -d *.gz + mkfontscale + mkfontdir + cd "$root/share/fonts/console" + gzip -d *.gz diff --git a/pkgs/tinyalsa b/pkgs/tinyalsa @@ -1,16 +0,0 @@ -url="$mirror/tinyalsa.tar.gz" - -build: crossmusl - set -x - cd src/tinyalsa - $CC -c mixer.c -Iinclude $CFLAGS - $CC -c pcm.c -Iinclude $CFLAGS - ar -r -c libtinyalsa.a mixer.o pcm.o - ranlib libtinyalsa.a - $CC tinyplay.c -o tinyplay -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS - $CC tinycap.c -o tinycap -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS - $CC tinymix.c -o tinymix -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS - $CC tinypcminfo.c -o tinypcminfo -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS - cp tinycap tinymix tinypcminfo tinyplay "$root/bin" - cp libtinyalsa.a "$root/lib" - cp -r include/tinyalsa "$root/include" diff --git a/pkgs/tinyalsa/build b/pkgs/tinyalsa/build @@ -0,0 +1,16 @@ +url="$mirror/tinyalsa.tar.gz" + +build: crossmusl + set -x + cd src/tinyalsa + $CC -c mixer.c -Iinclude $CFLAGS + $CC -c pcm.c -Iinclude $CFLAGS + ar -r -c libtinyalsa.a mixer.o pcm.o + ranlib libtinyalsa.a + $CC tinyplay.c -o tinyplay -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS + $CC tinycap.c -o tinycap -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS + $CC tinymix.c -o tinymix -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS + $CC tinypcminfo.c -o tinypcminfo -Iinclude $CFLAGS -L. -ltinyalsa $LDFLAGS + cp tinycap tinymix tinypcminfo tinyplay "$root/bin" + cp libtinyalsa.a "$root/lib" + cp -r include/tinyalsa "$root/include" diff --git a/pkgs/tinywm b/pkgs/tinywm @@ -1,5 +0,0 @@ -build: tinyxlib - set -x - cd stuff - $CC tinywm.c -o tinywm -lX11 $CFLAGS $LDFLAGS - cp tinywm "$root/bin" diff --git a/pkgs/tinywm/build b/pkgs/tinywm/build @@ -0,0 +1,5 @@ +build: tinyxlib + set -x + cd stuff + $CC tinywm.c -o tinywm -lX11 $CFLAGS $LDFLAGS + cp tinywm "$root/bin" diff --git a/pkgs/tinyxlib b/pkgs/tinyxlib @@ -1,8 +0,0 @@ -url="$mirror/tinyxlib.tar.gz" - -build: crossmusl - cd src/tinyxlib - make clean - make -j$nprocs CC=$CC BINDIR="/bin" LIBDIR="/lib" STATIC=1 \ - FONT_ENCODINGS_DIRECTORY="/share/fonts/encodings/encodings.dir" - make DESTDIR="$libcroot" BINDIR="/bin" LIBDIR="/lib" STATIC=1 install diff --git a/pkgs/tinyxlib/build b/pkgs/tinyxlib/build @@ -0,0 +1,8 @@ +url="$mirror/tinyxlib.tar.gz" + +build: crossmusl + cd src/tinyxlib + make clean + make -j$nprocs CC=$CC BINDIR="/bin" LIBDIR="/lib" STATIC=1 \ + FONT_ENCODINGS_DIRECTORY="/share/fonts/encodings/encodings.dir" + make DESTDIR="$libcroot" BINDIR="/bin" LIBDIR="/lib" STATIC=1 install diff --git a/pkgs/tinyxserver b/pkgs/tinyxserver @@ -1,19 +0,0 @@ -url="$mirror/tinyxserver.tar.gz" - -build: tinyxlib zlib - cd src/tinyxserver - case "$arch" in - x86_64) - EXTRA_CFLAGS="-D_XSERVER64=1 $CFLAGS" - ;; - i486) - EXTRA_CFLAGS="$CFLAGS" - ;; - esac - make clean - make -j$nprocs CC=$CC EXTRA_CFLAGS="$EXTRA_CFLAGS" \ - FONTDIR="/usr/share/fonts" - make DESTDIR="$root" BINDIR="/bin" install - cd "$root/usr/share/fonts/misc" - mkfontscale - mkfontdir diff --git a/pkgs/tinyxserver/build b/pkgs/tinyxserver/build @@ -0,0 +1,19 @@ +url="$mirror/tinyxserver.tar.gz" + +build: tinyxlib zlib + cd src/tinyxserver + case "$arch" in + x86_64) + EXTRA_CFLAGS="-D_XSERVER64=1 $CFLAGS" + ;; + i486) + EXTRA_CFLAGS="$CFLAGS" + ;; + esac + make clean + make -j$nprocs CC=$CC EXTRA_CFLAGS="$EXTRA_CFLAGS" \ + FONTDIR="/usr/share/fonts" + make DESTDIR="$root" BINDIR="/bin" install + cd "$root/usr/share/fonts/misc" + mkfontscale + mkfontdir diff --git a/pkgs/tmux b/pkgs/tmux @@ -1,9 +0,0 @@ -v="1.8" -url="$mirror/tmux-$v.tar.gz" - -build: ncurses libevent - cd src/tmux-$v - CC=$CC ./configure --prefix="$root" \ - CFLAGS="-I$libcroot/include/ncursesw $CFLAGS" - make -j$nprocs - make install diff --git a/pkgs/tmux/build b/pkgs/tmux/build @@ -0,0 +1,9 @@ +v="1.8" +url="$mirror/tmux-$v.tar.gz" + +build: ncurses libevent + cd src/tmux-$v + CC=$CC ./configure --prefix="$root" \ + CFLAGS="-I$libcroot/include/ncursesw $CFLAGS" + make -j$nprocs + make install diff --git a/pkgs/ubase b/pkgs/ubase @@ -1,30 +0,0 @@ -git="git://git.2f30.org/ubase" - -build: crossmusl - set -x - cd src/ubase - cp config.def.h config.h - for f in util/*.c; do - $CC -c $f -o "${f%%.c}.o" $CFLAGS - done - for f in util/*.o; do - ar -r -c util.a $f - done - ranlib util.a - for f in *.c; do - $CC -c $f $CFLAGS - done - for f in *.o; do - $CC -o "${f%.*}" $f util.a $LDFLAGS - done - for f in *.o; do - cp "${f%.*}" "$root/bin" - done - mkdir -p "$root/share/man/man1" - for f in *.1; do - cp $f "$root/share/man/man1" - done - mkdir -p "$root/share/man/man8" - for f in *.8; do - cp $f "$root/share/man/man8" - done diff --git a/pkgs/ubase/build b/pkgs/ubase/build @@ -0,0 +1,30 @@ +git="git://git.2f30.org/ubase" + +build: crossmusl + set -x + cd src/ubase + cp config.def.h config.h + for f in util/*.c; do + $CC -c $f -o "${f%%.c}.o" $CFLAGS + done + for f in util/*.o; do + ar -r -c util.a $f + done + ranlib util.a + for f in *.c; do + $CC -c $f $CFLAGS + done + for f in *.o; do + $CC -o "${f%.*}" $f util.a $LDFLAGS + done + for f in *.o; do + cp "${f%.*}" "$root/bin" + done + mkdir -p "$root/share/man/man1" + for f in *.1; do + cp $f "$root/share/man/man1" + done + mkdir -p "$root/share/man/man8" + for f in *.8; do + cp $f "$root/share/man/man8" + done diff --git a/pkgs/uuterm b/pkgs/uuterm @@ -1,7 +0,0 @@ -url="$mirror/uuterm.tar.gz" - -build: tinyxlib - cd src/uuterm - make clean - make CC=$CC LDFLAGS_X11="$LDFLAGS" uuterm-x11 - cp uuterm-x11 "$root/bin" diff --git a/pkgs/uuterm/build b/pkgs/uuterm/build @@ -0,0 +1,7 @@ +url="$mirror/uuterm.tar.gz" + +build: tinyxlib + cd src/uuterm + make clean + make CC=$CC LDFLAGS_X11="$LDFLAGS" uuterm-x11 + cp uuterm-x11 "$root/bin" diff --git a/pkgs/vim b/pkgs/vim @@ -1,12 +0,0 @@ -v="7.4" -url="http://ftp.vim.org/pub/vim/unix/vim-$v.tar.bz2" - -build: ncurses - cd src/vim74 - make clean - CC=$CC ./configure --prefix=/ \ - --enable-multibyte --disable-gui --with-x=no \ - --disable-nls --disable-netbeans - make -j$nprocs - make DESTDIR="$root" install - ln -sf vim "$root/bin/vi" diff --git a/pkgs/vim/build b/pkgs/vim/build @@ -0,0 +1,12 @@ +v="7.4" +url="http://ftp.vim.org/pub/vim/unix/vim-$v.tar.bz2" + +build: ncurses + cd src/vim74 + make clean + CC=$CC ./configure --prefix=/ \ + --enable-multibyte --disable-gui --with-x=no \ + --disable-nls --disable-netbeans + make -j$nprocs + make DESTDIR="$root" install + ln -sf vim "$root/bin/vi" diff --git a/pkgs/xsetroot b/pkgs/xsetroot @@ -1,5 +0,0 @@ -build: tinyxlib - set -x - cd stuff - $CC xsetroot.c -o xsetroot -lX11 $CFLAGS $LDFLAGS - cp xsetroot "$root/bin" diff --git a/pkgs/xsetroot/build b/pkgs/xsetroot/build @@ -0,0 +1,5 @@ +build: tinyxlib + set -x + cd stuff + $CC xsetroot.c -o xsetroot -lX11 $CFLAGS $LDFLAGS + cp xsetroot "$root/bin" diff --git a/pkgs/zlib b/pkgs/zlib @@ -1,8 +0,0 @@ -v="1.2.8" -url="$mirror/zlib-$v.tar.gz" - -build: crossmusl - cd src/zlib-$v - CC=$CC ./configure --prefix="$root" --libdir="$libcroot/lib" --static - make -j$nprocs - make install diff --git a/pkgs/zlib/build b/pkgs/zlib/build @@ -0,0 +1,8 @@ +v="1.2.8" +url="$mirror/zlib-$v.tar.gz" + +build: crossmusl + cd src/zlib-$v + CC=$CC ./configure --prefix="$root" --libdir="$libcroot/lib" --static + make -j$nprocs + make install diff --git a/stuff/cmp-fetch b/stuff/cmp-fetch @@ -1,4 +1,4 @@ #!/bin/sh pkg=`echo $1 | sed -e 's,-fetch$,,'` -cmp -s .cache/$1 pkgs/$pkg +cmp -s .cache/$1 pkgs/$pkg/build diff --git a/stuff/cmp-pkgs b/stuff/cmp-pkgs @@ -1,3 +1,3 @@ #!/bin/sh -cmp -s .cache/$1 pkgs/$1 +cmp -s .cache/$1 pkgs/$1/build diff --git a/stuff/fetch-pkg.mk b/stuff/fetch-pkg.mk @@ -1,4 +1,6 @@ - cp $top/pkgs/$target $top/.cache/$target + cp $pkgdir/build $top/.cache/$target + +pkgdir= fetch-target:QP./stuff/cmp-fetch: . cd src @@ -30,4 +32,4 @@ fetch-target:QP./stuff/cmp-fetch: . ;; esac fi - cp $top/pkgs/$pkg $top/.cache/$target + cp $pkgdir/build $top/.cache/$target