# HG changeset patch # User David Demelier # Date 1563701415 -7200 # Node ID 366305654d329731a951055e929e83a3aceee8bf # Parent 8580d997f05be33f522cbaa3911e9e06e64eaaa3 irc/ngircd: initial import, closes #1646 @20m diff -r 8580d997f05b -r 366305654d32 irc/ngircd/ngircd.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/irc/ngircd/ngircd.sh Sun Jul 21 11:30:15 2019 +0200 @@ -0,0 +1,92 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=ngircd +PKGVERSION=25 +PKGREVISION=1 +PKGLICENSE="GPLv2" +PKGSUMMARY="next generation IRC daemon" +PKGDOWNLOAD="https://ngircd.barton.de/pub/$PKGNAME/$PKGNAME-$PKGVERSION.tar.xz" +PKGOPTIONS="IPV6 PAM SSL ZLIB" +PKGPROTECT="etc/ngircd.conf" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} +: ${IPV6:=yes} +: ${PAM:=yes} +: ${SSL:=openssl} # openssl or gnutls +: ${ZLIB:=yes} + +if [ "$IPV6" = "yes" ]; then + with_ipv6="--enable-ipv6" +else + with_ipv6="--disable-ipv6" +fi + +if [ "$PAM" = "yes" ]; then + PKGDEPENDS="security/linux-pam $PKGDEPENDS" + with_pam="--with-pam" +else + with_pam="--without-pam" +fi + +if [ "$SSL" = "openssl" ]; then + PKGDEPENDS="crypto/libressl $PKGDEPENDS" + with_ssl="--with-openssl" +elif [ "$SSL" = "gnutls" ]; then + PKGDEPENDS="crypto/gnutls $PKGDEPENDS" + with_ssl="--with-gnutls" +else + with_ssl="--without-openssl --without-gnutls" +fi + +if [ "$ZLIB" = "zlib" ]; then + PKGDEPENDS="compression/zlib $PKGDEPENDS" + with_zlib="--with-zlib" +else + with_zlib="--without-zlib" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar xvf $PKGNAME-$PKGVERSION.tar.xz + cd $PKGNAME-$PKGVERSION + + CC="$CC" \ + CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix= \ + --sbindir=/bin \ + $with_ipv6 \ + $with_pam \ + $with_ssl \ + $with_zlib + make + make install DESTDIR=$DESTDIR + + cd .. + rm -rf $PKGNAME-$PKGVERSION +}