Skip to content

Commit

Permalink
land: Add pacman port, build userland using makepkg
Browse files Browse the repository at this point in the history
  • Loading branch information
lutoma committed Nov 14, 2023
1 parent fb8939c commit 0b8892c
Show file tree
Hide file tree
Showing 62 changed files with 2,168 additions and 3 deletions.
37 changes: 37 additions & 0 deletions land/base/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
pkgname=base
pkgver=1
pkgrel=2
pkgdesc="The basic components of the Xelix operating system."
arch=('any')
url="https://xelix.org"
license=('GPL')
depennds=('xelix-kernel' 'coreutils' 'bash' 'xelix-utils')
makedepends=()
source=()
sha256sums=()

package() {
install -d $pkgdir/boot
install -d $pkgdir/dev
install -d $pkgdir/etc
install -d $pkgdir/etc/init.d
install -d $pkgdir/home
install -d $pkgdir/home/root -m 700
install -d $pkgdir/sys
install -d $pkgdir/tmp
install -d $pkgdir/usr
install -d $pkgdir/usr/bin
install -d $pkgdir/usr/include
install -d $pkgdir/usr/lib
install -d $pkgdir/usr/share
install -d $pkgdir/var
install -d $pkgdir/var/run

rm $pkgdir/bin || true
ln -s usr/bin $pkgdir/bin

rm $pkgdir/etc/mtab || true
ln -s /sys/mounts $pkgdir/etc/mtab

cp -r ../etc $pkgdir/
}
4 changes: 4 additions & 0 deletions land/base/etc/init.d/console-login
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Service]
Target=default
ExecStart=/usr/bin/login
Restart=always
35 changes: 35 additions & 0 deletions land/bash/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pkgname=bash
pkgver=5.0
pkgrel=1
epoch=
pkgdesc=""
arch=('i786')
url="https://www.gnu.org/software/bash/"
license=('GPL')
source=('https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz' 'bash-5.0.patch')
sha256sums=(
'b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d'
'bcf1b6c4e9c5075aae1d2330b9512b714837597fc86e3048284bdadbfb1b2881')

prepare() {
patch -p0 < $pkgname-$pkgver.patch

cd $pkgname-$pkgver
# Multiple definitions needed due to conflicting definitions in termcap/libreadline
LDFLAGS="-Wl,--allow-multiple-definition" ./configure \
--host=i786-pc-xelix \
--prefix=/usr \
--sysconfdir=/etc \
--without-bash-malloc \
--disable-job-control
}

build() {
cd $pkgname-$pkgver
make
}

package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
51 changes: 51 additions & 0 deletions land/binutils/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
pkgname=binutils
pkgver=2.40
pkgrel=1
pkgdesc="The GNU Binutils are a collection of binary tools."
arch=('i786')
url="https://www.gnu.org/software/binutils/"
license=('GPL')
makedepends=('flac' 'openssl' 'zlib' 'bzip2')
source=(
'https://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.gz'
'binutils-2.40.patch'
'elf_i386_xelix.sh'
'elf_x86_64_xelix.sh'
)
sha256sums=(
'd7f82c4047decf43a6f769ac32456a92ddb6932409a585c633cdd4e9df23d956'
'SKIP'
'SKIP'
'SKIP'
)

prepare() {
cd $pkgname-$pkgver
patch -p0 < ../$pkgname-$pkgver.patch
cp ../elf_i386_xelix.sh ../elf_x86_64_xelix.sh ld/emulparams
find . -name "config.cache" -delete
}

build() {
cd $pkgname-$pkgver
cd ld
aclocal
automake
cd ..
autoreconf-2.69

./configure \
--host=i786-pc-xelix \
--prefix=/usr \
--sysconfdir=/etc \
--disable-werror \
--disable-plugins \
--disable-nls

make
}

package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
18 changes: 18 additions & 0 deletions land/bzip2/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pkgname=bzip2
pkgver=1.0.2
pkgrel=1
pkgdesc="bzip2 is a freely available, patent free (see below), high-quality data compressor."
arch=('i786')
url="https://sourceware.org/bzip2/"
source=('https://sourceware.org/pub/bzip2/bzip2-1.0.2.tar.gz')
sha256sums=('4b526afa73ca1ccd6f5f1f5fd23813f159f715c3d0e00688f1df54b51f443cdd')

build() {
cd $pkgname-$pkgver
make CC=i786-pc-xelix-gcc libbz2.a bzip2
}

package() {
cd $pkgname-$pkgver
make PREFIX=$pkgdir install
}
47 changes: 47 additions & 0 deletions land/cairo/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pkgname=cairo
pkgver=1.16.0
pkgrel=1
pkgdesc="Cairo is a 2D graphics library with support for multiple output devices."
arch=('i786')
url="https://www.cairographics.org/"
depends=('fontconfig')
makedepends=('zlib' 'libpng' 'freetype' 'fontconfig' 'pixman')
source=(
'https://www.cairographics.org/releases/cairo-1.16.0.tar.xz'
'cairo.patch'
)
sha256sums=(
'5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331'
'SKIP'
)

prepare() {
cd $pkgname-$pkgver
patch -p0 < ../cairo.patch
}

build() {
cd $pkgname-$pkgver
CFLAGS="$CFLAGS -DCAIRO_NO_MUTEX=1" ./configure \
--host=i786-pc-xelix \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-xcb \
--disable-xcb-shm \
--disable-xlib \
--disable-xlib-xrender \
--disable-gobject \
--disable-fc

# Disable tests that won't work in non-native environment
echo -e 'all:\n\ttrue\ninstall:\n\ttrue' > test/Makefile
echo -e 'all:\n\ttrue\ninstall:\n\ttrue' > perf/Makefile

make
}

package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
46 changes: 46 additions & 0 deletions land/coreutils/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
pkgname=coreutils
pkgver=8.32
pkgrel=3
pkgdesc="The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system."
arch=('i786')
arch_override=('i786')
url="https://www.gnu.org/software/coreutils/"
license=('GPL')
makedepends=('newlib' 'openssl' 'libiconv' 'gmp')
source=(
'https://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz'
'coreutils-8.32.patch'
'coreutils-8.32-patch-two.patch')
sha256sums=(
'4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa'
'927b1b9d90d09063e8e662e3b41f91f1d216cea0e97a5df247137b4970da1714'
'74d85891fbfd578f779749febfee5a1ca0db65a2349a47b8c5f6b1a38808c1bb')

prepare() {
patch -p0 < $pkgname-$pkgver.patch
cd $pkgname-$pkgver
autoreconf
./configure \
--host=i786-pc-xelix \
--prefix=/usr \
--sysconfdir=/etc \
--disable-threads \
--disable-acl \
--disable-xattr \
--disable-largefile \
--enable-no-install-program=arch,coreutils,dmesg,mknod,uptime \
--with-openssl

# Needs to be applied after configure
patch -p1 < ../coreutils-8.32-patch-two.patch
}

build() {
cd $pkgname-$pkgver
make
}

package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
47 changes: 47 additions & 0 deletions land/curl/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pkgname=curl
pkgver=
pkgrel=1
epoch=
pkgdesc=""
arch=('i786')
arch_override=('i786')
url="https://www.gnu.org/software/coreutils/"
license=('GPL')
makedepends=('newlib' 'openssl' 'libiconv' 'gmp')
source=(
'https://curl.se/download/curl-8.4.0.tar.xz'
'coreutils-8.32.patch'
'coreutils-8.32-patch-two.patch')
sha256sums=(
'4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa'
'927b1b9d90d09063e8e662e3b41f91f1d216cea0e97a5df247137b4970da1714'
'74d85891fbfd578f779749febfee5a1ca0db65a2349a47b8c5f6b1a38808c1bb')

prepare() {
patch -p0 < $pkgname-$pkgver.patch
cd $pkgname-$pkgver
autoreconf
./configure \
--host=i786-pc-xelix \
--prefix=/usr \
--sysconfdir=/etc \
--disable-threads \
--disable-acl \
--disable-xattr \
--disable-largefile \
--enable-no-install-program=arch,coreutils,dmesg,mknod \
--with-openssl

# Needs to be applied after configure
patch -p1 < ../coreutils-8.32-patch-two.patch
}

build() {
cd $pkgname-$pkgver
make
}

package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
29 changes: 29 additions & 0 deletions land/darkhttpd/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pkgname=darkhttpd
pkgver=1.13
pkgrel=1
pkgdesc="When you need a web server in a hurry."
arch=('i786')
url="https://github.com/emikulic/darkhttpd"
source=(
'https://github.com/emikulic/darkhttpd/archive/refs/tags/v1.13.tar.gz'
'darkhttpd-1.13.patch'
)
sha256sums=(
'1d88c395ac79ca9365aa5af71afe4ad136a4ed45099ca398168d4a2014dc0fc2'
'SKIP'
)

prepare() {
patch -p0 < $pkgname-$pkgver.patch
}

build() {
cd $pkgname-$pkgver
CC=i786-pc-xelix-gcc CFLAGS="-O3 -DNO_IPV6" make
}

package() {
cd $pkgname-$pkgver
install -d $pkgdir/usr/bin/
install -D darkhttpd $pkgdir/usr/bin/
}
30 changes: 30 additions & 0 deletions land/dash/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pkgname=dash
pkgver=0.5.10.2
pkgrel=1
pkgdesc="DASH is a POSIX-compliant implementation of /bin/sh that aims to be as small as possible."
arch=('i786')
url="http://gondor.apana.org.au/~herbert/dash/"
source=(
'http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.10.2.tar.gz'
'dash-0.5.10.2.patch'
)
sha256sums=(
'3c663919dc5c66ec991da14c7cf7e0be8ad00f3db73986a987c118862b5f6071'
'SKIP'
)

build() {
cd $pkgname-$pkgver
./configure \
--host=i786-pc-xelix \
--prefix=/usr \
--sysconfdir=/etc

patch -p1 < ../dash-0.5.10.2.patch
make
}

package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
}
35 changes: 35 additions & 0 deletions land/dialog/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pkgname=dialog
pkgver=1.3.20191210
pkgrel=1
pkgdesc="Display dialog boxes from shell scripts."
arch=('i786')
depends=('ncurses')
source=(
'https://invisible-island.net/archives/dialog/dialog-1.3-20191210.tgz'
'dialog-1.3-20191210.patch'
)
sha256sums=(
'10f7c02ee5dea311e61b0d3e29eb6e18bcedd6fb6672411484c1a37729cbd7a6'
'SKIP'
)

prepare() {
patch -p0 < dialog-1.3-20191210.patch
}

build() {
cd dialog-1.3-20191210
./configure \
--host=i786-pc-xelix \
--disable-shared \
--enable-static \
--prefix=/usr \
--sysconfdir=/etc

make
}

package() {
cd dialog-1.3-20191210
make DESTDIR=$pkgdir install
}
Loading

0 comments on commit 0b8892c

Please sign in to comment.