summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-05-13 19:20:01 +0300
committerDimitris Kiziridis2020-05-13 19:20:01 +0300
commit3766a6f4df84c6162522b4c4e520a3c840fce696 (patch)
treeffad175c7e6989e5845df9a65546964e74e1a09b
parent48f59668ac36c7461238615ff020dbcecc95d879 (diff)
downloadaur-3766a6f4df84c6162522b4c4e520a3c840fce696.tar.gz
sanitize pkgbuild
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD15
-rw-r--r--discount-0.4-1.rockspec34
3 files changed, 46 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 37b60a9e7e1a..9100b0595405 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,8 +9,10 @@ pkgbase = lua-discount
depends = discount
source = https://github.com/craigbarnes/lua-discount/archive/0.4.tar.gz
source = https://luarocks.org/manifests/craigb/discount-0.4-1.rockspec
+ source = LICENSE::https://github.com/craigbarnes/lua-discount/raw/master/LICENSE
sha256sums = 3531eeddde4a89d5b7a4ab9b359a7f01a88ac85dd4fac61554eb199165cfdead
sha256sums = edb216e8a28534f18d8950779b50dab083c8f339eaed90b68814b97c27af8255
+ sha256sums = 8b2fffc6b27a33bf6958a2a2293ce19ce5cbd7206ccb6dda7a9d3abe6f80c9fa
pkgname = lua-discount
pkgdesc = Lua bindings for the Discount Markdown library for Lua 5.3
diff --git a/PKGBUILD b/PKGBUILD
index 30abb9f8747c..132e5bf938df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,11 +10,16 @@ license=('ISC')
depends=('discount')
makedepends=('luarocks')
source=("https://github.com/craigbarnes/lua-discount/archive/${pkgver}.tar.gz"
- "https://luarocks.org/manifests/craigb/discount-${pkgver}-1.rockspec")
+ "https://luarocks.org/manifests/craigb/discount-${pkgver}-1.rockspec"
+ 'LICENSE::https://github.com/craigbarnes/lua-discount/raw/master/LICENSE')
sha256sums=('3531eeddde4a89d5b7a4ab9b359a7f01a88ac85dd4fac61554eb199165cfdead'
- 'edb216e8a28534f18d8950779b50dab083c8f339eaed90b68814b97c27af8255')
+ 'edb216e8a28534f18d8950779b50dab083c8f339eaed90b68814b97c27af8255'
+ '8b2fffc6b27a33bf6958a2a2293ce19ce5cbd7206ccb6dda7a9d3abe6f80c9fa')
prepare() {
+ if [[ -f "${srcdir}/lua-discount-${pkgver}/discount-${pkgver}-1.rockspec" ]]; then
+ rm "${srcdir}/lua-discount-${pkgver}/discount-${pkgver}-1.rockspec"
+ fi
ln -s "${srcdir}/discount-${pkgver}-1.rockspec" "${srcdir}/lua-discount-${pkgver}/"
}
@@ -33,7 +38,7 @@ package_lua-discount() {
pkgdesc='Lua bindings for the Discount Markdown library for Lua 5.3'
luarocks install --lua-version=5.3 --tree="$pkgdir/usr/" --deps-mode=none 5.3/*.rock
-
+ install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# remove luarocks-created root manifest
rm "$pkgdir/usr/lib/luarocks/rocks-5.3/manifest"
}
@@ -42,7 +47,7 @@ package_lua51-discount() {
pkgdesc='Lua bindings for the Discount Markdown library for Lua 5.1'
luarocks install --lua-version=5.1 --tree="$pkgdir/usr/" --deps-mode=none 5.1/*.rock
-
+ install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# remove luarocks-created root manifest
rm "$pkgdir/usr/lib/luarocks/rocks-5.1/manifest"
}
@@ -51,7 +56,7 @@ package_lua52-discount() {
pkgdesc='Lua bindings for the Discount Markdown library for Lua 5.2'
luarocks install --lua-version=5.2 --tree="$pkgdir/usr/" --deps-mode=none 5.2/*.rock
-
+ install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
# remove luarocks-created root manifest
rm "$pkgdir/usr/lib/luarocks/rocks-5.2/manifest"
} \ No newline at end of file
diff --git a/discount-0.4-1.rockspec b/discount-0.4-1.rockspec
new file mode 100644
index 000000000000..0e46533b2e9f
--- /dev/null
+++ b/discount-0.4-1.rockspec
@@ -0,0 +1,34 @@
+package = "discount"
+version = "0.4-1"
+
+description = {
+ summary = "Lua bindings for the Discount Markdown library",
+ homepage = "https://github.com/craigbarnes/lua-discount",
+ license = "ISC"
+}
+
+source = {
+ url = "https://craigbarnes.gitlab.io/dist/lua-discount/lua-discount-0.4.tar.gz",
+ md5 = "919647cfea67d7430f4516609e442e4d"
+}
+
+dependencies = {
+ "lua >= 5.1"
+}
+
+external_dependencies = {
+ DISCOUNT = {
+ header = "mkdio.h",
+ library = "markdown"
+ }
+}
+
+build = {
+ type = "builtin",
+ modules = {
+ discount = {
+ sources = {"discount.c"},
+ libraries = {"markdown"}
+ }
+ }
+}