So I forked makepkg into makepnd and produced PND under dchrt.
Even though makepkg is 3k lines of bash, I was surprised that it dint depend on pacman pretty much at all, and was quite depressed how little effort I had actually do.
Here is recipe:
# Maintainer: Jari Vetoniemi <mailRoxas <at> gmail <dot> com>
pkgname=milkyhelper
pkgver=3.0.6
pkgrel=6
pkgdesc="Package manager for PND repositories"
url="http://github.com/Cloudef/libpndman"
license=('WTFPL')
depends=('jansson' 'curl' 'openssl' 'expat' 'bzip2')
source=('milky.sh' 'startup.conf'
'icon.png' 'milky1.png' 'milky2.png' 'milky3.png'
'git+git://github.com/Cloudef/libpndman.git')
icon=('icon.png')
screenshot=('milky1.png' 'milky2.png' 'milky3.png')
executable=('milky.sh')
category=('Settings/PackageManager')
md5sums=('90c73f9c56b5214d652c0e64448b8b01'
'6e03ccb492c9510c4a9ea3f50756244e'
'66c00447bc5abacd02bbfdd81a57d6c8'
'3a039fe54507fdf57111aa33958b4ead'
'e7ac3042801b8104d389fb9ce1f393e1'
'5749c26c777cc2e1ebfa587d75534a7a'
'SKIP')
build() {
cd libpndman
git submodule update --init --recursive # jansson is not in opkg
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIBPNDMAN_BUILD_STATIC=ON .
make
}
package() {
cd "$srcdir/libpndman"
make DESTDIR="$pkgdir" install
install -m755 "$srcdir/milky.sh" "$pkgdir/"
install -m644 "$srcdir/startup.conf" "$pkgdir/"
install -m644 "$srcdir/milky"{1,2,3}".png" "$pkgdir/"
install -m644 "$srcdir/icon.png" "$pkgdir/"
}
# vim: set ts=8 sw=2 tw=0 ft=sh syn=sh :
And here is output PND:
http://cloudef.eu/pnd/milkyhelper-3.0.6-6-armv7.pnd
(and yes, it works)
All the makepkg features also work that don't depend on pacman. I already inserted hook to call different package managers and am thinking of supporting, pacman, opkg and apt-get (build dependencies).
(Runtime dependencies are not the context of current pnd system here, recipe however would copy missing libraries in default os to the PND or static link)
These kinds of recipes would go to some centralized site (see AUR).
There would be way to contribute improvements to them by community members as well, to fix such things as the famous control mappings and such.
This would also encourage people send patches that should not be in recipe to upstream. (be in recipe of course until accepted)
Of course you could generate deb from this too, but for that I would separate the PND specific script files to post_package_pnd() or something, since they are not needed in .deb (or any other distro specific format).