summaryrefslogblamecommitdiff
path: root/system/adelie-base/APKBUILD
blob: f73e2a0d7c856b32b29987050edcfa99ea6259cb (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.7.0
pkgrel=3
pkgdesc="The Adélie Linux Base System"
url="http://adelielinux.org/"
arch="noarch"
license="NCSA"
_core_depends="apk-tools adelie-keys shadow
	shimmy grep procps bash
	coreutils diffutils findutils sharutils
	util-linux net-tools
	sysklogd
	patch sed vim psmisc less"
depends="adelie-core debianutils libarchive-tools file zsh binutils
	console-setup sysklogd man-db tzdata"
makedepends=""
makedepends_host="$depends"
install=""
options="!check !fhs"
subpackages="adelie-core:core $pkgname-doc $pkgname-posix $pkgname-lsb dev-kit:devkit"
provides="alpine-base"
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

	# kill files that sometimes get in release.tar
	rm "$builddir"/tree/dev/.dirkeep || true
	rm "$builddir"/tree/proc/.dirkeep || true
	rm "$builddir"/tree/sys/.dirkeep || true
}

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

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

core() {
	core="The Adélie Linux minimal runtime environment"
	depends=$_core_depends
	replaces="adelie-base"
	mkdir -p "$subpkgdir"
	mv -i "$pkgdir"/* "$subpkgdir"/
}

doc() {
	local _doc DOCS
	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 fcron heirloom-pax m4 mailx mawk"
	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="5f4ac9c30e9066fbebc12a194c7fc7c24a35f986e195905e1914ab4809b0a795e726fa326c45309fb66eeac51f1e43ffceb5aa93f4672e2043fb042cab12457a  adelie-base-0.7.0.tar.xz
e6775b9e1c6421338aaceee375b3b74aa100fd444e369b280ce45c9167119b76bebc11737d7f929e50e20a553a35e0e25f7d0f71deb0483d3bccc08e319dcf98  group
9eede0c1cd56a9ffb5227cc9446cdb1bbe73d5f17cd5ee99cf29acca3160f3a96d79e1420311a140f9d9f32950b9823b33ad84dadf7b85921d4f1a945dd5a252  passwd
a5035c18efc50be5d0c8dd452619d781da09c9441ed53462c99693170d1ae2b4306a81846e42b616c5ef8cd5b6fbbf047f93ae5ee9613126581cf701b3a6ade7  addgroup
f50be377c781b1eefb1804ac9d96b4ebc64f80abe0d12b288413687a000e79ca30c531bbced2c63f9e4df59b1d8a71d0eda09ee82782eaafea453f2f1c2f7b8f  adduser"