diff core/sed/sed.sh @ 136:e737b80da269

core: merge .sh and .info
author David Demelier <markand@malikania.fr>
date Mon, 11 Mar 2019 14:59:13 +0100
parents 6262fa438d54
children 605b4a7b264a
line wrap: on
line diff
--- a/core/sed/sed.sh	Mon Mar 11 11:45:04 2019 +0100
+++ b/core/sed/sed.sh	Mon Mar 11 14:59:13 2019 +0100
@@ -15,40 +15,55 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
+PKGNAME=sed
+PKGVERSION=4.7
+PKGREVISION=1
+PKGLICENSE="GPLv3+"
+PKGSUMMARY="GNU stream editor"
+PKGDOWNLOAD="https://ftp.gnu.org/pub/gnu/sed/$PKGNAME-$PKGVERSION.tar.xz"
+PKGOPTIONS="ACL NLS"
+
 : ${CHOST:=$(uname -m)-linux-musl}
 : ${CBUILD:=$(uname -m)-linux-musl}
 : ${CC:=gcc}
 : ${CFLAGS:=-O2}
-
-source ./sed.info
-
-set -ex
+: ${LDFLAGS:=}
+: ${LIBS:=}
+: ${ACL:=yes}
+: ${NLS:=yes}
 
 if [ "$ACL" = "yes" ]; then
+	PKGDEPENDS="core/acl $PKGDEPENDS"
 	with_acl="--with-acl"
 else
 	with_acl="--without-acl"
 fi
 if [ "$NLS" = "yes" ]; then
+	PKGDEPENDS="core/gettext $PKGDEPENDS"
 	with_nls="--enable-nls"
 else
 	with_nls="--disable-nls"
 fi
 
-rm -rf $PKGNAME-$PKGVERSION
-tar xvaf $PKGNAME-$PKGVERSION.tar.xz
-pushd $PKGNAME-$PKGVERSION
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvaf $PKGNAME-$PKGVERSION.tar.xz
+	pushd $PKGNAME-$PKGVERSION
 
-CC="$CC" \
-CFLAGS="$CFLAGS" \
-./configure \
-	--build=$CBUILD \
-	--host=$CHOST \
-	--prefix=/usr \
-	${with_acl} \
-	${with_nls}
-make
-make install DESTDIR=$DESTDIR
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		${with_acl} \
+		${with_nls}
+	make
+	make install DESTDIR=$DESTDIR
 
-popd
-rm -rf $PKGNAME-$PKGVERSION
+	popd
+	rm -rf $PKGNAME-$PKGVERSION
+}