Last active
December 16, 2015 06:59
-
-
Save shizeeg/5395455 to your computer and use it in GitHub Desktop.
luasocket-git PKGBUILD for Arch Linux
updated according latest official AUR Guidelines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Alfredo Palhares <masterkorp@masterkorp.net> | |
# Contributor: Shizeeg Unadequatov <shizeeque@gmail.com> | |
# Please submit your patches to: | |
# https://github.com/masterkorp/pkgbuilds | |
pkgname=luasocket-git | |
_gitname=luasocket | |
pkgver=20130605 | |
pkgrel=2 | |
pkgdesc="Luasocket is the most comprehensive networking support library for the Lua language, with IPv6 support. This version compatible with Lua 5.1 and 5.2" | |
arch=('i686' 'x86_64') | |
url="https://github.com/diegonehab/luasocket/" | |
license=('MIT') | |
depends=('lua' 'glibc') | |
makedepends=('git') | |
conflicts=('luasocket' 'luasocket-hg') | |
provides=('lua-socket=2.1' 'lua51-socket=2.1') | |
source=('luasocket::git://github.com/diegonehab/luasocket.git' | |
'lua-license.html::http://www.lua.org/copyright.html') | |
md5sums=('SKIP' | |
'2fb4d59102a072eac02c95a74cd16b95') | |
pkgver() { | |
cd "$_gitname" | |
# generate version from git commit count | |
# echo "$(git rev-list --count makepkg).$(git rev-parse --short makepkg)" | |
# also you can generate version from tip date | |
echo $(git log -1 --date=short | grep Date | sed 's|[^0-9]||g') | |
} | |
build() { | |
cd "$_gitname" | |
make PLAT=linux prefix=/usr | |
} | |
package() { | |
cd "$_gitname" | |
make DESTDIR="$pkgdir" prefix=/usr install-both | |
install -D -m0644 "$srcdir/lua-license.html" "$pkgdir/usr/share/licenses/$pkgname/lua-license.html" | |
find "$pkgdir" -type d -name .git -exec rm -r '{}' + | |
} | |
# vim: set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fix provides=() and pkgver()
now it upgrades both versions correctly.