Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (45 sloc) 1.92 KB
# Maintainer: Jasper den Ouden <o.jasper@gmail.com>
#
# Note: package is mean, installs itself in /usr/share/
# I didn't feel like figuring out where the packages go, its all just in there.
# also why not in AUR.
# Another reason is that i don't actually want to make the lua accessible as
# lib, as i
pkgname=page_html_set.lua
pkgver=0.0.3
pkgrel=0
pkgdesc="Userscript and lua server for bookmarks, history and a bunch of commands.(like watch-with-mpv)"
arch=('i686' 'x86_64')
url="https://github.com/o-jasper/page_html"
license=('AGPL, MIT')
# Note: more dependencies are already-packaged-in. (pegasus, bunch of stuff of mine)
depends=('lua' 'lua-socket' 'lua-sql-sqlite')
makedepends=()
optdepends=('mpv: directly view videos with mpv'
'wget: for downloading things'
'curl: for downloading things'
'tor: torified version of above')
options=(!emptydirs)
# Note: no security here, make sure the md5sums/sha256sums are proper.
source=("http://ojasper.nl/data/${pkgname}.${pkgver}.tar.gz")
md5sums=('a89f76a0d3c0af0258a4ebc937167f7a')
sha256sums=('1a8527a4a22d11190180daf5b4fa9cb0d7100f8de4f0ef2b223db0a8ca4a8244')
# Note this is as-of the-commit-after-b9da82a82e975f1462921dad4501e5ca751fcedf
build() {
# Add "binary" that selects the proper lua packages.
mkdir -p bin/
echo '#!/usr/bin/lua' > bin/page_html.lua
echo 'package.path="/usr/local/share/'${pkgname}'/page_html/?.lua;/usr/local/share/'${pkgname}'/page_html/?/init.lua"' >> bin/page_html.lua
echo '-- package.cpath should be fine' >> bin/page_html.lua
echo >> bin/page_html.lua
echo 'require "run"' >> bin/page_html.lua
}
package() {
# The "executable"
install -D -m755 bin/page_html.lua ${pkgdir}/usr/bin/page_html.lua
# Rest of the files. This PKGBUILD is a bit of a "dump it in"
mkdir -p ${pkgdir}/usr/local/share/${pkgname}/
find ${pkgname}/ -type f | while read line; do
install -D -m644 $line ${pkgdir}/usr/local/share/$line
done
}