summaryrefslogblamecommitdiff
path: root/user/mksh/APKBUILD
blob: acbe85329ffc930e53e12dbe95d9bafc55758fb3 (plain) (tree)
1
2
3
4
5
6
7
8


                                          
         



                                                          



                      
                          




                                                                                  









                                                                


                                               
 




                                               











                                                                        
                                                                                                                                                           
# Contributor: Marek Benc <dusxmt@gmx.com>
# Maintainer: Marek Benc <dusxmt@gmx.com>
pkgname=mksh
pkgver=57
pkgrel=0
pkgdesc="MirBSD Korn Shell, a free Korn Shell interpreter"
url="http://mirbsd.de/mksh"
arch="all"
license="MirOS OR ISC"
depends=""
makedepends=""
checkdepends="ed perl"
subpackages="$pkgname-doc"
install="mksh.post-install mksh.post-upgrade mksh.pre-deinstall"
source="http://www.mirbsd.org/MirOS/dist/mir/${pkgname}/${pkgname}-R${pkgver}.tgz"
builddir=$srcdir/$pkgname

build() {
	# Build the main shell:
	/bin/sh ./Build.sh -r
	mv test.sh test_mksh.sh

	# Build the compatibility/legacy shell:
	CFLAGS="$CFLAGS -DMKSH_BINSHPOSIX -DMKSH_BINSHREDUCED" \
		/bin/sh ./Build.sh -r -L
	mv test.sh test_lksh.sh
}

check() {
	echo "Running the test suite for mksh:"
	./test_mksh.sh

	echo "Running the test suite for lksh:"
	./test_lksh.sh
}

package() {
	mkdir -p "$pkgdir"/bin
	install -m 755 mksh "$pkgdir"/bin
	install -m 755 lksh "$pkgdir"/bin

	mkdir -p "$pkgdir"/usr/share/man/man1/
	install -m 644 mksh.1 "$pkgdir"/usr/share/man/man1/
	install -m 644 lksh.1 "$pkgdir"/usr/share/man/man1/

	mkdir -p "$pkgdir"/usr/share/doc/mksh/examples/
	install -m 644 dot.mkshrc "$pkgdir"/usr/share/doc/mksh/examples/
}

sha512sums="7d7fa557c17da4f1f62f82877a136439efb6d4f9fde52b2df39214db09868982e756df6e4fe83498f9013cbcf3252dc383b00ddfafaa4c9f143ffded7cd255b3  mksh-R57.tgz"