summaryrefslogblamecommitdiff
path: root/system/adelie-base/APKBUILD
blob: 7598e83a443df6864b8663a69d5070cdf6b769e2 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                  
                   
            
        



                                       
                                     



                                                        

                                         

              



                                                                                 



                

         








                                                         



                      
                          
                                      

                                                           




                                                                










                                                                             
                                                            
                                                   
                             



                
                                                                                    







                                                                    
                             


                
                                                                                                                                                                      
                                                                                                                                       


                                                                                                                                          
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=adelie-base
pkgver=0.4.0
pkgrel=0
pkgdesc="The Adélie Linux Base System"
url="http://adelielinux.org/"
arch="noarch"
license="NCSA"
depends="apk-tools shadow debianutils
	libarchive-tools file shimmy grep procps
	zsh bash
	binutils coreutils diffutils findutils sharutils
	util-linux net-tools kbd
	sysklogd
	man-db patch sed vim psmisc less"
makedepends=""
install=""
options="!check !fhs"
subpackages="$pkgname-doc $pkgname-posix $pkgname-lsb dev-kit:devkit"
source="https://distfiles.adelielinux.org/source/$pkgname/$pkgname-$pkgver.tar.xz
	group
	passwd
	addgroup
	adduser
	"

build() {
	# taken from Alpine Base Layout

	# generate shadow
	awk -F: '{
		pw = ":!:"
		if ($1 == "root") { pw = "::" }
		print($1 pw ":0:::::")
	}' "$srcdir"/passwd > "$builddir"/tree/etc/shadow
	chmod 640 "$builddir"/tree/etc/shadow
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"
	make install DESTDIR="$pkgdir"
	install -m644 "$srcdir"/group "$pkgdir"/etc/group
	install -m644 "$srcdir"/passwd "$pkgdir"/etc/passwd

	# stupid inflatable stupid busybox
	for i in adduser addgroup; do
		install -m755 "$srcdir"/$i "$pkgdir"/usr/sbin/$i
	done
}

doc() {
	DOCS="CONTRIBUTING.rst LICENSE README.rst"
	for _doc in $DOCS; do
		install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
	done
}

posix() {
	depends="at bc cflow cups ed m4 mailx ncompress pax"
	pkgdesc="$pkgdesc - Additional POSIX tools"
	mkdir -p "$subpkgdir"
	return 0
}

lsb() {
	depends="gettext gzip libarchive-tools linux-pam make mawk ncurses nspr nss"
	pkgdesc="$pkgdesc - Additional LSB tools"
	mkdir -p "$subpkgdir"
	return 0
}

devkit() {
	depends="build-tools fakeroot gzip libarchive-tools mawk xz"
	pkgdesc="The Adélie Linux Development Kit"
	mkdir -p "$subpkgdir"
	return 0
}

sha512sums="557cc53610c3fed8d570f0c0048370eb633f87b72df52fac73b3f3b4327cf76191419f5fbe12208f45dee15588514509bcda8efa2bb0a2dfa52f4f26dbce0f53  adelie-base-0.4.0.tar.xz
e6775b9e1c6421338aaceee375b3b74aa100fd444e369b280ce45c9167119b76bebc11737d7f929e50e20a553a35e0e25f7d0f71deb0483d3bccc08e319dcf98  group
9eede0c1cd56a9ffb5227cc9446cdb1bbe73d5f17cd5ee99cf29acca3160f3a96d79e1420311a140f9d9f32950b9823b33ad84dadf7b85921d4f1a945dd5a252  passwd
a5035c18efc50be5d0c8dd452619d781da09c9441ed53462c99693170d1ae2b4306a81846e42b616c5ef8cd5b6fbbf047f93ae5ee9613126581cf701b3a6ade7  addgroup
9e53246d7674279b64962eb45060f07a752f86e9b3cee49b4b05be4dd13113b03c18e62381c92546fae9b05b3dc6100f29cea48c716b3219d973444f71e1fd5a  adduser"