Last active
March 31, 2016 00:36
-
-
Save dvtate/1af1ce0ff26eb393db70 to your computer and use it in GitHub Desktop.
PKGBUILD: An arch build system (ABS) script for MarisaHttpd. (this file is incomplete and will not build)
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
pkgbase = marisahttpd-git | |
pkgdesc = High-effiency dynamic webpage server and runtime for C/C++ | |
pkgver = 0.4.r35.g45274d1 | |
pkgrel = 1 | |
url = https://github.com/AmamiyaRinyuki/MarisaHttpd | |
arch = any | |
license = GPL | |
makedepends = git | |
makedepends = libmicrohttpd | |
provides = marisa | |
provides = libkirisame.so | |
provides = marisa-logview | |
source = marisahttpd-git::git+https://github.com/AmamiyaRinyuki/MarisaHttpd | |
md5sums = SKIP | |
pkgname = marisahttpd-git |
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
# Developer: Amamiya Shinki <[email protected]> | |
# Maintainer: Dustin Van Tate Testa <[email protected]> | |
pkgname=marisahttpd-git | |
pkgver=0.4.r35.g45274d1 # calls `pkgver()` to replace this number (ver from git) | |
pkgrel=1 | |
license=('GPL') | |
pkgdesc="High-effiency dynamic webpage server and runtime for C/C++" | |
url="https://github.com/AmamiyaRinyuki/MarisaHttpd" | |
arch=('any') | |
makedepends=('git' 'libmicrohttpd') | |
provides=("marisa" "libkirisame.so" "marisa-logview") | |
source=("$pkgname::git+https://github.com/AmamiyaRinyuki/MarisaHttpd") | |
md5sums=('SKIP') | |
pkgver() { | |
cd $pkgname | |
git describe --tags --long | sed -r -e 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,[-_],.,g' | |
} | |
package() { | |
cd $pkgname | |
mkdir $pkgdir/usr/ | |
mkdir $pkgdir/usr/bin/ | |
mkdir $pkgdir/usr/lib/ | |
gcc -shared -fpic -Ofast src/kirisame.c src/libs/*.c -Ilibs -o $pkgdir/lib/libkirisame.so | |
gcc -Ofast src/marisa.c src/grimoire.c src/magicshop.c srd/kirisame.c -ldl -lm -lpthread -lmicrohttpd -o $pkgdir/usr/bin/marisa | |
gcc -Ofast src/logview.c -o $pkgdir/usr/bin/marisa-logview | |
install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have tested this and it works fine (exactly how I planned), however, I still feel like there's a more correct way to do what I've done...
on arch linux this can be run by putting this file into a folder and then runing
makepkg -si
to install it and it's dependencies. (refer to https://wiki.archlinux.org/index.php/Arch_User_Repository for more detail).@AmamiyaRinyuki Now I'll submit the package to the AUR :)