aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/libwebsockets/APKBUILD48
1 files changed, 18 insertions, 30 deletions
diff --git a/main/libwebsockets/APKBUILD b/main/libwebsockets/APKBUILD
index fb4bd85356..fe84c84c0b 100644
--- a/main/libwebsockets/APKBUILD
+++ b/main/libwebsockets/APKBUILD
@@ -7,50 +7,38 @@ pkgdesc="C library for lightweight websocket clients and servers"
url="http://libwebsockets.org"
arch="all"
license="LGPL2.1"
-depends=
-depends_dev=""
-makedepends="$depends_dev cmake zlib-dev libressl-dev"
+makedepends="cmake zlib-dev libressl-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-test:_test"
-source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/libwebsockets/archive/v$pkgver.tar.gz
- "
-
-_srcdir="${srcdir}"/libwebsockets-$pkgver
-_builddir="${srcdir}/build"
-prepare() {
- cd "$_srcdir"
- for i in $source; do
- case $i in
- *.patch)
- msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || return 1
- ;;
- esac
- done
-}
-
+source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/$pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
build() {
- mkdir "$_builddir"
- cd "$_builddir"
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- "$_srcdir" || return 1
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_VERBOSE_MAKEFILE=TRUE \
+ || return 1
make
}
package() {
- cd "$_srcdir"
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+
+ install -Dm644 LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1
+ make -C build DESTDIR="$pkgdir" install || return 1
}
_test() {
- pkgdesc="$pkgdesc - test server"
+ pkgdesc="$pkgdesc (test server)"
+
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
-
md5sums="4df3be57dee43aeebd54a3ed56568f50 libwebsockets-2.1.0.tar.gz"
sha256sums="bcc96aaa609daae4d3f7ab1ee480126709ef4f6a8bf9c85de40aae48e38cce66 libwebsockets-2.1.0.tar.gz"
sha512sums="57d40d7ee90032ad8abe1463ade3256ae23a18e78175a55095cffe8e5d19acbc67239090248df48fef19339d8bf89ee633ae5909facc0f6c7655f3bfecf5f358 libwebsockets-2.1.0.tar.gz"