From 16e799786f34721e646e14a2b7e7ab3816137f1a Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 2 Oct 2021 23:21:53 +0100 Subject: added packages --- psibuilds/bash.psibuild | 11 ++----- psibuilds/bc.psibuild | 15 +++++++++ psibuilds/binutils.psibuild | 13 ++++++++ psibuilds/bzip2.psibuild | 37 +++++++++++++++++++++ psibuilds/dejagnu.psibuild | 23 +++++++++++++ psibuilds/expect.psibuild | 20 ++++++++++++ psibuilds/file.psibuild | 20 ++++++++++++ psibuilds/flex.psibuild | 19 +++++++++++ psibuilds/gcc.psibuild | 15 +++++++++ psibuilds/glibc.psibuild | 78 +++++++++++++++++++++++++++++++++++++++++++++ psibuilds/gmp.psibuild | 25 +++++++++++++++ psibuilds/iana-etc.psibuild | 16 ++++++++++ psibuilds/m4.psibuild | 14 ++++++++ psibuilds/psibuild.psibuild | 10 ++++++ psibuilds/readline.psibuild | 19 +++++++++++ psibuilds/tar.psibuild | 13 ++++++++ psibuilds/tcl.psibuild | 28 ++++++++++++++++ psibuilds/xz.psibuild | 14 ++++++++ psibuilds/zlib.psibuild | 19 +++++++++++ psibuilds/zstd.psibuild | 18 +++++++++++ 20 files changed, 418 insertions(+), 9 deletions(-) create mode 100644 psibuilds/bc.psibuild create mode 100644 psibuilds/binutils.psibuild create mode 100644 psibuilds/bzip2.psibuild create mode 100644 psibuilds/dejagnu.psibuild create mode 100644 psibuilds/expect.psibuild create mode 100644 psibuilds/file.psibuild create mode 100644 psibuilds/flex.psibuild create mode 100644 psibuilds/gcc.psibuild create mode 100644 psibuilds/glibc.psibuild create mode 100644 psibuilds/gmp.psibuild create mode 100644 psibuilds/iana-etc.psibuild create mode 100644 psibuilds/m4.psibuild create mode 100644 psibuilds/psibuild.psibuild create mode 100644 psibuilds/readline.psibuild create mode 100644 psibuilds/tar.psibuild create mode 100644 psibuilds/tcl.psibuild create mode 100644 psibuilds/xz.psibuild create mode 100644 psibuilds/zlib.psibuild create mode 100644 psibuilds/zstd.psibuild (limited to 'psibuilds') diff --git a/psibuilds/bash.psibuild b/psibuilds/bash.psibuild index 9a5d1af..b2a0156 100644 --- a/psibuilds/bash.psibuild +++ b/psibuilds/bash.psibuild @@ -1,19 +1,12 @@ #!/bin/bash -DEPS=(readline libreadline.so=8-64 glibc ncurses) +DEPS=(readline glibc ncurses) -fetch () { - git clone https://git.savannah.gnu.org/git/bash.git -} +SOURCE=https://git.savannah.gnu.org/git/bash.git build () { - cd bash ./configure --without-bash-malloc --prefix=/usr make make DESTDIR=$PKG_DEST install } -package () { - echo "packaged" -} - diff --git a/psibuilds/bc.psibuild b/psibuilds/bc.psibuild new file mode 100644 index 0000000..989dc96 --- /dev/null +++ b/psibuilds/bc.psibuild @@ -0,0 +1,15 @@ +#!/bin/bash + +DEPS=(readline) + +SOURCE=https://github.com/gavinhoward/bc + + +build () { + CC=gcc ./configure --prefix=/usr -G -O3 + make + make test + make DESTDIR=$PKG_DEST install +} + + diff --git a/psibuilds/binutils.psibuild b/psibuilds/binutils.psibuild new file mode 100644 index 0000000..ea8caac --- /dev/null +++ b/psibuilds/binutils.psibuild @@ -0,0 +1,13 @@ +#!/bin/bash + +DEPS=() + +SOURCE=git://sourceware.org/git/binutils.git + + +build () { + ./configure --prefix=/usr --disable-nls --disable-werror + make + make DESTDIR=$PKG_DEST install +} + diff --git a/psibuilds/bzip2.psibuild b/psibuilds/bzip2.psibuild new file mode 100644 index 0000000..726f0f7 --- /dev/null +++ b/psibuilds/bzip2.psibuild @@ -0,0 +1,37 @@ +#!/bin/bash + +DEPS=(glibc sh) + +SOURCE=git://sourceware.org/git/bzip2.git + + +build () { + + # ensure symbolic links are relative + sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile + + make -f Makefile-libbz2_so + make clean + + make + + make PREFIX=$PKG_DEST/usr install + +} + +package () { + cp -av libbz2.so* $PKG_DEST/usr/lib + cp -av libbz2.so.1.0.8 $PKG_DEST/usr/lib/libbz2.so + + cp -v bzip2-shared $PKG_DEST/usr/bin/bzip2 + for i in $PKG_DEST/usr/bin/{bzcat,bunzip2}; do + cp -afv bzip2 $i + done + + # remove a useless static library + cp -v bzip2-shared $PKG_DEST/usr/bin/bzip2 + for i in $PKG_DEST/usr/bin/{bzcat,bunzip2}; do + ln -sfv bzip2 $i + done +} + diff --git a/psibuilds/dejagnu.psibuild b/psibuilds/dejagnu.psibuild new file mode 100644 index 0000000..ee09ef3 --- /dev/null +++ b/psibuilds/dejagnu.psibuild @@ -0,0 +1,23 @@ +#!/bin/bash + +DEPS=(sh expect) + +SOURCE=git://git.sv.gnu.org/dejagnu.git + + +build () { + mkdir -v build + cd build + + ../configure --prefix=/usr + + makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi + makeinfo --plaintext -o doc/dejagnu.txt ../doc/dejagnu.texi + + make DESTDIR=$PKG_DEST install + + install -v -dm755 $PKG_DEST/usr/share/doc/dejagnu-1.6.3 + install -v -m644 doc/dejagnu.{html,txt} $PKG_DEST/usr/share/doc/dejagnu-1.6.3 +} + + diff --git a/psibuilds/expect.psibuild b/psibuilds/expect.psibuild new file mode 100644 index 0000000..e2288a3 --- /dev/null +++ b/psibuilds/expect.psibuild @@ -0,0 +1,20 @@ +#!/bin/bash + +DEPS=(tcl) + +SOURCE=https://github.com/aeruder/expect + + +build () { + # note: --with-tcl, we might want to make a way to use the tcl that we've compiled in another package + ./configure --prefix=/usr --with-tcl=/usr/lib --enable-shared --mandir=/usr/share/man --with-tclinclude=/usr/include + make + make test + make DESTDIR=$PKG_DEST install +} + +package () { + cp libexpect*.so $PKG_DEST/usr/lib +} + + diff --git a/psibuilds/file.psibuild b/psibuilds/file.psibuild new file mode 100644 index 0000000..9141847 --- /dev/null +++ b/psibuilds/file.psibuild @@ -0,0 +1,20 @@ +#!/bin/bash + +DEPS=(glibc ) + +SOURCE=https://github.com/file/file + + +build () { + # cheating + wget http://ftp.astron.com/pub/file/file-5.40.tar.gz + tar -zxf file-5.40.tar.gz + cd file-5.40 + + ./configure --prefix=/usr + make + make check + make DESTDIR=$PKG_DEST install +} + + diff --git a/psibuilds/flex.psibuild b/psibuilds/flex.psibuild new file mode 100644 index 0000000..88d61a6 --- /dev/null +++ b/psibuilds/flex.psibuild @@ -0,0 +1,19 @@ +#!/bin/bash + +DEPS=(glibc m4 sh) + +SOURCE=https://github.com/nlitsme/gnubc + + +build () { + ./configure --prefix=/usr --docdir=/usr/share/doc/flex --disable-static + make + make check + make DESTDIR=$PKG_DEST install +} + +package () { + ln -sv $PKG_DEST/usr/bin/flex $PKG_DEST/usr/bin/lex +} + + diff --git a/psibuilds/gcc.psibuild b/psibuilds/gcc.psibuild new file mode 100644 index 0000000..3edb513 --- /dev/null +++ b/psibuilds/gcc.psibuild @@ -0,0 +1,15 @@ +#!/bin/bash + +DEPS=(glibc) + +SOURCE=git://gcc.gnu.org/git/gcc.git + + +build () { + mkdir -v build + cd build + ../configure --prefix=/usr --disable-multilib --disable-bootstrap + make + make DESTDIR=$PKG_DEST install +} + diff --git a/psibuilds/glibc.psibuild b/psibuilds/glibc.psibuild new file mode 100644 index 0000000..5b111bd --- /dev/null +++ b/psibuilds/glibc.psibuild @@ -0,0 +1,78 @@ +#!/bin/bash + +DEPS=(glibc) + +SOURCE=https://sourceware.org/git/glibc.git + +build () { + # patches as recommended by lfs + sed -e '/NOTIFY_REMOVED)/s/)/ \&\& data.attr != NULL)/' -i sysdeps/unix/sysv/linux/mq_notify.c + + mkdir -v build + cd build + + # ensure that the ldconfig and sln utilities are installed into /usr/sbin + echo "rootsbindir=/usr/sbin" > configparms + + ../configure --prefix=/usr \ + --disable-werror \ + --enable-kernel=3.2 \ + --enable-stack-protector=strong \ + --with-headers=/usr/include \ + libc_cv_slibdir=/usr/lib + + make + make check + + sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile + make DESTDIR=$PKG_DEST install + + + # fix hardcoded path to the excutable in ldd script + sed '/RTLDLIST=/s@/usr@@g' -i $PKG_DEST/usr/bin/ldd + + cp -v ../nscd/nscd.conf $PKG_DEST/etc/nscd.conf + mkdir -pv $PKG_DEST/var/cache/nscd +} + +package () { + cat > $PKG_DEST/etc/nsswitch.conf << "EOF" +# Begin /etc/nsswitch.conf +passwd: files +group: files +shadow: files +hosts: files dns +networks: files +protocols: files +services: files +ethers: files +rpc: files +# End /etc/nsswitch.conf +EOF + + wget https://mirrors.slackware.com/slackware/slackware64-current/source/a/glibc-zoneinfo/tzdata2021a.tar.gz + + tar -xf tzdata2021a.tar.gz + + ZONEINFO=$PKG_DEST/usr/share/zoneinfo + mkdir -pv $ZONEINFO/{posix,right} + for tz in etcetera southamerica northamerica europe africa antarctica \ + asia australasia backward; do + zic -L /dev/null -d $ZONEINFO ${tz} + zic -L /dev/null -d $ZONEINFO/posix ${tz} + zic -L leapseconds -d $ZONEINFO/right ${tz} + done + cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO + zic -d $ZONEINFO -p America/New_York + unset ZONEINFO + + + # configure the dynamic loader + + cat > $PKG_DEST/etc/ld.so.conf << "EOF" +# Begin /etc/ld.so.conf +/usr/local/lib +/opt/lib +EOF +} + diff --git a/psibuilds/gmp.psibuild b/psibuilds/gmp.psibuild new file mode 100644 index 0000000..4a62d77 --- /dev/null +++ b/psibuilds/gmp.psibuild @@ -0,0 +1,25 @@ +#!/bin/bash + +DEPS=(gcc-libs sh) + +SOURCE=https://github.com/ryepdx/gmp + + +build () { + ./configure --prefix=/usr --enable-cxx --disable-static --docdir=/usr/share/doc/gmp + + make + make html + + make check 2>&1 | tee gmp-check-log + awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log + + make DESTDIR=$PKG_DEST install + make DESTDIR=$PKG_DEST install-html +} + +package () { + ln -sv $PKG_DEST/usr/bin/flex $PKG_DEST/usr/bin/lex +} + + diff --git a/psibuilds/iana-etc.psibuild b/psibuilds/iana-etc.psibuild new file mode 100644 index 0000000..6466472 --- /dev/null +++ b/psibuilds/iana-etc.psibuild @@ -0,0 +1,16 @@ +#!/bin/bash + +DEPS=() + +SOURCE=https://github.com/Mic92/iana-etc + +build () { + python update.py out +} + +package () { + mkdir -vp $PKG_DEST/etc + cp -v out/dist/protocols $PKG_DEST/etc/ + cp -v out/dist/services $PKG_DEST/etc/ +} + diff --git a/psibuilds/m4.psibuild b/psibuilds/m4.psibuild new file mode 100644 index 0000000..f28ec33 --- /dev/null +++ b/psibuilds/m4.psibuild @@ -0,0 +1,14 @@ +#!/bin/bash + +DEPS=(glibc bash) + +SOURCE=git://git.sv.gnu.org/m4 + + +build () { + ./configure --prefix=/usr + make + make check + make DESTDIR=$PKG_DEST install +} + diff --git a/psibuilds/psibuild.psibuild b/psibuilds/psibuild.psibuild new file mode 100644 index 0000000..2f68018 --- /dev/null +++ b/psibuilds/psibuild.psibuild @@ -0,0 +1,10 @@ +#!/bin/bash + +DEPS=(bash tar) + +SOURCE=https://git.davidovski.xyz/psibuild.git + +package () { + cp psibuild $PKG_DEST/usr/bin/ +} + diff --git a/psibuilds/readline.psibuild b/psibuilds/readline.psibuild new file mode 100644 index 0000000..2721677 --- /dev/null +++ b/psibuilds/readline.psibuild @@ -0,0 +1,19 @@ +#!/bin/bash + +DEPS=(glibc ncurses) + +SOURCE=https://git.savannah.gnu.org/git/readline.git + + +build () { + ./configure --prefix=/usr \ + --disable-static \ + --with-curses \ + --docdir=/usr/share/doc/readline-8.1 + + make SHLIB_LIBS="-lncursesw" + make SHLIB_LIBS="-lncursesw" DESTDIR=$PKG_DEST install + + install -v -m644 doc/*.{ps,pdf,html,dvi} $PKG_DEST/usr/share/doc/readline-8.1 +} + diff --git a/psibuilds/tar.psibuild b/psibuilds/tar.psibuild new file mode 100644 index 0000000..829d6d2 --- /dev/null +++ b/psibuilds/tar.psibuild @@ -0,0 +1,13 @@ +#!/bin/bash + +DEPS=(glibc) + +SOURCE=https://git.savannah.gnu.org/git/tar.git + +build () { + ./bootstrap + ./configure --prefix=/usr + make + make DESTDIR=$PKG_DEST install +} + diff --git a/psibuilds/tcl.psibuild b/psibuilds/tcl.psibuild new file mode 100644 index 0000000..16442f4 --- /dev/null +++ b/psibuilds/tcl.psibuild @@ -0,0 +1,28 @@ +#!/bin/bash + +DEPS=(zlib) + +SOURCE=https://github.com/tcltk/tcl + + +build () { + SRCDIR=$(pwd) + cd unix + ./configure --prefix=/usr --mandir=/usr/share/man $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit) + + make test + + make DESTDIR=$PKG_DEST install + + chmod -v u+w $PKG_DEST/usr/lib/libtcl8.6.so + + make DESTDIR=$PKG_DEST install-private-headers +} + +package () { + cp -f tclsh8.6 $PKG_DEST/usr/bin/tclsh + mv $PKG_DEST/usr/share/man/man3/{Thread,Tcl_Thread}.3 + +} + + diff --git a/psibuilds/xz.psibuild b/psibuilds/xz.psibuild new file mode 100644 index 0000000..e17f53b --- /dev/null +++ b/psibuilds/xz.psibuild @@ -0,0 +1,14 @@ +#!/bin/bash + +DEPS=(sh) + +SOURCE=https://git.tukaani.org/xz.git + + +build () { + ./configure --prefix=/usr --disable-static --docdir=$PKG_DEST/usr/share/doc/xz-5.2.5 + make + make check + make DESTDIR=$PKG_DEST install +} + diff --git a/psibuilds/zlib.psibuild b/psibuilds/zlib.psibuild new file mode 100644 index 0000000..c771727 --- /dev/null +++ b/psibuilds/zlib.psibuild @@ -0,0 +1,19 @@ +#!/bin/bash + +DEPS=(glibc) + +SOURCE=https://github.com/madler/zlib + + +build () { + ./configure --prefix=/usr + make + make check + make DESTDIR=$PKG_DEST install +} + +package () { + # Remove a useless static library (lfs recommended) + rm -fv $PKG_DEST/usr/lib/libz.a +} + diff --git a/psibuilds/zstd.psibuild b/psibuilds/zstd.psibuild new file mode 100644 index 0000000..63ba9af --- /dev/null +++ b/psibuilds/zstd.psibuild @@ -0,0 +1,18 @@ +#!/bin/bash + +DEPS=(glibc gcc-libs zlib xz lz4) + +SOURCE=https://github.com + + +build () { + make + make prefix=/usr check + make DESTDIR=$PKG_DEST install +} + +package () { + # Remove a useless static library (lfs recommended) + rm -v $PKG_DEST/usr/lib/libzstd.a +} + -- cgit v1.2.1