diff print/cups/cups.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children 9867e578b1a9
line wrap: on
line diff
--- a/print/cups/cups.sh	Fri Oct 15 16:07:30 2021 +0200
+++ b/print/cups/cups.sh	Wed Oct 27 11:32:16 2021 +0200
@@ -62,40 +62,43 @@
 	with_pam="--disable-pam"
 fi
 
-rm -rf $PKGNAME-$PKGVERSION
-tar xvf $PKGNAME-$PKGVERSION-source.tar.gz
-cd $PKGNAME-$PKGVERSION
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-$PKGVERSION-source.tar.gz
+	cd $PKGNAME-$PKGVERSION
 
-# --without-rcdir: do not install custom init scripts.
-CC="$CC" \
-CFLAGS="$CFLAGS" \
-CXX="$CXX" \
-CXXFLAGS="$CXXFLAGS" \
-LDFLAGS="$LDFLAGS" \
-LIBS="$LIBS" \
-./configure \
-	--build=$CBUILD \
-	--host=$CHOST \
-	--prefix=/usr \
-	--sbindir=/bin \
-	--disable-systemd \
-	--enable-shared \
-	--without-rcdir \
-	--with-cups-user=lp \
-	--with-cups-group=lp \
-	--with-system-groups=wheel \
-	--with-icondir=/share/icons \
-	--with-menudir=/share/applications \
-	$with_acl \
-	$with_dbus \
-	$with_pam
-make
-make install BUILDROOT=$DESTDIR
-install -Dm0644 ../cupsd $DESTDIR/etc/rc.d/cupsd
+	# --without-rcdir: do not install custom init scripts.
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	CXX="$CXX" \
+	CXXFLAGS="$CXXFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--sbindir=/bin \
+		--disable-systemd \
+		--enable-shared \
+		--without-rcdir \
+		--with-cups-user=lp \
+		--with-cups-group=lp \
+		--with-system-groups=wheel \
+		--with-icondir=/share/icons \
+		--with-menudir=/share/applications \
+		$with_acl \
+		$with_dbus \
+		$with_pam
+	make
+	make install BUILDROOT=$DESTDIR
+	install -Dm0644 ../cupsd $DESTDIR/etc/rc.d/cupsd
 
-if [ "$PAM" = "yes" ]; then
-	install -Dm0644 ../cups $DESTDIR/etc/pam.d/cups
-fi
+	if [ "$PAM" = "yes" ]; then
+		install -Dm0644 ../cups $DESTDIR/etc/pam.d/cups
+	fi
 
-cd ..
-rm -rf $PKGNAME-$PKGVERSION
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}