convert a couple of packages to the new package system

This commit is contained in:
hippoz 2021-07-01 20:57:17 +03:00
parent 4dc299869a
commit 4a5bf7cce5
22 changed files with 195 additions and 133 deletions

View file

@ -1,9 +0,0 @@
prepare:
git clone git://git.sv.gnu.org/autoconf
cd autoconf
autoconf:
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
uninstall:
$(MAKE) uninstall

14
autoconf/PACKAGE Normal file
View file

@ -0,0 +1,14 @@
#!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone git://git.sv.gnu.org/autoconf
cd autoconf
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,9 +0,0 @@
prepare:
git clone https://git.savannah.gnu.org/git/auto$(MAKE).git
cd auto$(MAKE)
auto$(MAKE):
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
uninstall:
$(MAKE) uninstall

13
automake/PACKAGE Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone https://git.savannah.gnu.org/git/automake.git
cd automake
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,9 +0,0 @@
prepare:
git clone https://git.savannah.gnu.org/git/bash.git
cd bash
bash:
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
uninstall:
$(MAKE) uninstall

13
bash/PACKAGE Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone https://git.savannah.gnu.org/git/bash.git
cd bash
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,9 +1,12 @@
prepare: #!/bin/sh
pkg_ver="2.10.1"
pkg_install() {
wget -O binutils.tar.gz https://mirrors.nav.ro/gnu/binutils/binutils-2.10.1.tar.gz wget -O binutils.tar.gz https://mirrors.nav.ro/gnu/binutils/binutils-2.10.1.tar.gz
tar -xf binutils.tar.gz tar -xf binutils.tar.gz
cd binutils cd binutils
$(MAKE):
@../configure --prefix=/usr \ ../configure --prefix=/usr \
--enable-gold \ --enable-gold \
--enable-ld=default \ --enable-ld=default \
--enable-plugins \ --enable-plugins \
@ -11,8 +14,11 @@ $(MAKE):
--disable-werror \ --disable-werror \
--enable-64-bit-bfd \ --enable-64-bit-bfd \
--with-system-zlib --with-system-zlib
$(MAKE) tooldir=${PREFIX}/usr
install: make tooldir=/usr
$(MAKE) install tooldir=${PREFIX}/usr DESTDIR="${PREFIX}" make install tooldir=/usr DESTDIR=$1
uninstall: }
$(MAKE) uninstall
pkg_uninstall() {
make uninstall
}

View file

@ -1,11 +0,0 @@
prepare:
wget -O bison.tar.gz https://mirrors.nav.ro/gnu/bison/bison-1.25.tar.gz
tar -xf bison.tar.gz
cd bison
$(MAKE):
@./configure --prefix=/usr
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
uninstall:
$(MAKE) uninstall

15
bison/PACKAGE Normal file
View file

@ -0,0 +1,15 @@
#!/bin/sh
pkg_ver="1.25"
pkg_install() {
wget -O bison.tar.gz https://mirrors.nav.ro/gnu/bison/bison-1.25.tar.gz
tar -xf bison.tar.gz
cd bison
./configure --prefix=/usr
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,11 +0,0 @@
prepare:
git clone git://busybox.net/busybox.git
cd busybox
busybox:
$(MAKE) defconfig
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
busybox --install
uninstall:
$(MAKE) uninstall

14
busybox/PACKAGE Normal file
View file

@ -0,0 +1,14 @@
#!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone git://busybox.net/busybox.git
cd busybox
make defconfig
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,14 +0,0 @@
prepare:
git clone https://www.sourceware.org/pub/bzip2/bzip2-latest.tar.gz bzip2
cd bzip2
$(MAKE):
$(MAKE) -f Makefile-libbz2_so
$(MAKE) clean
$(MAKE)
install:
$(MAKE) PREFIX=${PREFIX}/tools install
cp -v bzip2-shared ${PREFIX}/tools/bin/bzip2
cp -av libbz2.so* ${PREFIX}/tools/lib
ln -sv libbz2.so.1.0 ${PREFIX}/tools/lib/libbz2.so
uninstall:
$(MAKE) uninstall

19
bzip2/PACKAGE Normal file
View file

@ -0,0 +1,19 @@
#!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone https://www.sourceware.org/pub/bzip2/bzip2-latest.tar.gz bzip2
cd bzip2
make -f Makefile-libbz2_so
make clean
make
make PREFIX=$1/tools install
cp -v bzip2-shared $1/tools/bin/bzip2
cp -av libbz2.so* $1/tools/lib
ln -sv libbz2.so.1.0 $1/tools/lib/libbz2.so
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,11 +0,0 @@
prepare:
wget -O curl.tar.gz https://curl.se/download/curl-7.77.0.tar.gz
tar -xf curl.tar.gz
cd curl
$(MAKE):
@./configure --prefix=/usr --with-openssl
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
uninstall:
$(MAKE) uninstall

16
curl/PACKAGE Normal file
View file

@ -0,0 +1,16 @@
#!/bin/sh
pkg_ver="7.77.0"
pkg_depends="openssl"
pkg_install() {
wget -O curl.tar.gz https://curl.se/download/curl-7.77.0.tar.gz
tar -xf curl.tar.gz
cd curl
./configure --prefix=/usr --with-openssl
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,16 +1,22 @@
prepare: #!/bin/sh
pkg_ver="2.6.4"
pkg_install() {
wget -O flex.tar.gz https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz wget -O flex.tar.gz https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz
tar -xf flex.tar.gz tar -xf flex.tar.gz
cd flex cd flex
$(MAKE):
@./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes
$(MAKE) make
install: make install DESTDIR="$1"
$(MAKE) install DESTDIR="${PREFIX}"
ln -s flex "$1/usr/bin/lex" ln -s flex "$1/usr/bin/lex"
uninstall: }
$(MAKE) uninstall
pkg_uninstall() {
make uninstall
}

View file

@ -1,16 +1,21 @@
prepare: #!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone git://gcc.gnu.org/git/gcc.git git clone git://gcc.gnu.org/git/gcc.git
cd gcc cd gcc
gcc:
sed -i '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64 sed -i '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64
sed -i 's/lib64/lib/' gcc/gcc/config/i386/linux64.h sed -i 's/lib64/lib/' gcc/gcc/config/i386/linux64.h
mkdir build mkdir build
cd build cd build
./configure --prefix=${PREFIX}/usr --enable-languages=c,c++,d,fortran,go,objc,obj-c++ ./configure --prefix=/usr --enable-languages=c,c++,d,fortran,go,objc,obj-c++
$(MAKE) make
install: make install DESTDIR="$1"
$(MAKE) install DESTDIR="${PREFIX}"
ln -s gcc "$1/usr/bin/cc" ln -s gcc "$1/usr/bin/cc"
install -Dm755 ../c99 "$1/usr/bin/c99" install -Dm755 ../c99 "$1/usr/bin/c99"
uninstall: }
rm -rf /usr/bin/gcc
pkg_uninstall() {
make uninstall
}

View file

@ -1,9 +0,0 @@
prepare:
git clone git://git.kernel.org/pub/scm/git/git.git
cd git
git:
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
uninstall:
$(MAKE) uninstall

13
git/PACKAGE Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
pkgver="todo"
pkg_install() {
git clone git://git.kernel.org/pub/scm/git/git.git
cd git
make
make install DESTDIR="$1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,11 +1,14 @@
#!/bin/sh
pkgver="todo"
pkg_install() {
prepare: prepare:
git clone https://git.savannah.gnu.org/git/gzip.git/ git clone https://git.savannah.gnu.org/git/gzip.git/
cd gzip cd gzip
$(MAKE): ./configure --prefix=$1/usr --host=$1
./configure --prefix=$prefix/usr --host=$LFS_TGT make CC="${CC:-cc} -static"
$(MAKE) CC="${CC:-cc} -static" make DESTDIR=$1 install
install:
$(MAKE) DESTDIR=$LFS install
install -Dm755 pigz "$1/usr/bin/pigz" install -Dm755 pigz "$1/usr/bin/pigz"
install -Dm755 unpigz "$1/usr/bin/unpigz" install -Dm755 unpigz "$1/usr/bin/unpigz"
install -Dm644 pigz.1 "$1/usr/share/man/man1/pigz.1" install -Dm644 pigz.1 "$1/usr/share/man/man1/pigz.1"
@ -13,3 +16,9 @@ install:
ln -sf pigz "$1/usr/bin/zcat" ln -sf pigz "$1/usr/bin/zcat"
ln -sf unpigz "$1/usr/bin/gunzip" ln -sf unpigz "$1/usr/bin/gunzip"
ln -sf pigz.1 "$1/usr/share/man/man1/gzip.1" ln -sf pigz.1 "$1/usr/share/man/man1/gzip.1"
}
pkg_uninstall() {
make uninstall
}

View file

@ -1,21 +0,0 @@
prepare:
git clone https://github.com/Sweets/hummingbird hummingbird
cd hummingbird
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/fs
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/interlude
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/shutdown
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/tty
$(MAKE):
$(MAKE)
install:
$(MAKE) install DESTDIR="${PREFIX}"
mv fs ${PREFIX}/usr/bin/hummingbird/
mv interlude ${PREFIX}/usr/bin/hummingbird/
mv shutdown ${PREFIX}/usr/bin/hummingbird/
mv tty ${PREFIX}/usr/bin/hummingbird/
chmod +x ${PREFIX}/usr/bin/hummingbird/*
uninstall:
@echo "pkgmsg: hummingbird does not have a proper uninstall script"
# we would need to rm -rf ${PREFIX}/usr/lib/hummingbird
# and rm $(INSTALL) hummingbird "$(DESTDIR)/usr/bin/hummingbird" "$(DESTDIR)/usr/bin/shutdown" "$(DESTDIR)/usr/bin/reboot"

23
hummingbird/PACKAGE Normal file
View file

@ -0,0 +1,23 @@
#!/bin/sh
pkg_ver="todo"
pkg_install() {
git clone https://github.com/Sweets/hummingbird hummingbird
cd hummingbird
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/fs
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/interlude
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/shutdown
wget https://git.hippoz.xyz/alnux/repo/src/branch/master/hummingbird/payload/usr/lib/hummingbird/tty
make
make install DESTDIR="$1"
mv fs $1/usr/bin/hummingbird/
mv interlude $1/usr/bin/hummingbird/
mv shutdown $1/usr/bin/hummingbird/
mv tty $1/usr/bin/hummingbird/
chmod +x $1/usr/bin/hummingbird/*
}
pkg_uninstall() {
# TODO
}