~alpine/devel

testing/next3-{grsec,vserver}: fixed APKBUILD v1 PROPOSED

Matt Smith: 1
 testing/next3-{grsec,vserver}: fixed APKBUILD

 2 files changed, 22 insertions(+), 54 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/206/mbox | git am -3
Learn more about email & git

[alpine-devel] [PATCH] testing/next3-{grsec,vserver}: fixed APKBUILD Export this patch

---
 testing/next3-grsec/APKBUILD   |   38 +++++++++++---------------------------
 testing/next3-vserver/APKBUILD |   38 +++++++++++---------------------------
 2 files changed, 22 insertions(+), 54 deletions(-)

diff --git a/testing/next3-grsec/APKBUILD b/testing/next3-grsec/APKBUILD
index 01782f5..27989d4 100644
--- a/testing/next3-grsec/APKBUILD
+++ b/testing/next3-grsec/APKBUILD
@@ -18,14 +18,14 @@ pkgname=${_realname}-${_flavor}
pkgver=$pkgver
# when changing _next3ver we *must* bump _mypkgrel
_next3ver=1.0.13-rc6
_mypkgrel=1
_mypkgrel=2
pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="NEXT3(TM) is a flavor of the widely used Ext3 file system with built-in support for snapshots."
url="http://www.ctera.com/home/next3.html"
arch="all"
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} wget coreutils"
makedepends="linux-${_flavor}-dev=${_kernelver} coreutils"
install="$pkgname.post-install
	$pkgname.post-upgrade
	$pkgname.post-deinstall"
@@ -39,43 +39,27 @@ _builddir="$srcdir"/${_realname}-${_next3ver}
prepare() {
	cd "$_builddir"

	# modify the Makefile to use install from coreutils
	sed -ri "s;(install -T);/bin/\1;" Makefile

	# modify the Makefile, add necessary options to mkfs.next3
	# during make test (these are also necessary for normal use)
	# See the CHANGELOG for Dec 13, 2010.
	sed -ri "s;(mkfs.next3) (test.img);\1 -O exclude_inode,has_snapshot \2;" Makefile

	# modify the Makefile, change INSTALL_DIR
	sed -ri "s;^(INSTALL_DIR=).*$;\1"$pkgdir"/lib/modules/${_abi_release}/fs/next3;" Makefile

	# modify the Makefile, update the depmod line to only run when root
	# and run it against the $_abi_release kernel version
	sed -ri "s;(/sbin/depmod -a);\[ \`id -u\` = 0 \] \&\& \1 ${_abi_release} || :\n\n\tmkdir -p "$pkgdir"/sbin;" Makefile

	# modify the Makefile, remove the modprobe line
	# modify the Makefile, remove the depmod and modprobe lines
	sed -ri "s;(/sbin/depmod -a);;" Makefile
	sed -ri "s;(/sbin/modprobe next3);;" Makefile

	# modify the Makefile, update the install lines for 'make install'
	sed -ri "s;(install) (.*) (/sbin);\1 -m755 \2 "$pkgdir"\3;" Makefile
	# modify the Makefile to use 'install' from coreutils
	sed -ri "s;(install -T);/bin/\1;" Makefile

	# modify the Makefile to install next3 utils into $pkgdir/sbin
	sed -ri "s;(install) (bin)/(.*) (/sbin);\1 -Dm755 \2/\3 "$pkgdir"\4/\3;" Makefile
}

build() {
	cd "$_builddir"

	# Build Next3
	make KVERS="${_abi_release}" || return 1

	# Test Next3
	sudo make KVERS="${_abi_release}" test || return 1
	make KERNEL="${_abi_release}" || return 1
}

package() {
	cd "$_builddir"

	# Install Next3 into $pkgdir
	make KVERS="${_abi_release}" install || return 1
	make install KERNEL="${_abi_release}" INSTALL_DIR="$pkgdir"/lib/modules/${_abi_release}/fs/next3 || return 1
}

doc() {
diff --git a/testing/next3-vserver/APKBUILD b/testing/next3-vserver/APKBUILD
index 4208c62..99179e5 100644
--- a/testing/next3-vserver/APKBUILD
+++ b/testing/next3-vserver/APKBUILD
@@ -18,14 +18,14 @@ pkgname=${_realname}-${_flavor}
pkgver=$pkgver
# when changing _next3ver we *must* bump _mypkgrel
_next3ver=1.0.13-rc6
_mypkgrel=1
_mypkgrel=2
pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="NEXT3(TM) is a flavor of the widely used Ext3 file system with built-in support for snapshots."
url="http://www.ctera.com/home/next3.html"
arch="all"
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} wget coreutils"
makedepends="linux-${_flavor}-dev=${_kernelver} coreutils"
install="$pkgname.post-install
	$pkgname.post-upgrade
	$pkgname.post-deinstall"
@@ -39,43 +39,27 @@ _builddir="$srcdir"/${_realname}-${_next3ver}
prepare() {
	cd "$_builddir"

	# modify the Makefile to use install from coreutils
	sed -ri "s;(install -T);/bin/\1;" Makefile

	# modify the Makefile, add necessary options to mkfs.next3
	# during make test (these are also necessary for normal use)
	# See the CHANGELOG for Dec 13, 2010.
	sed -ri "s;(mkfs.next3) (test.img);\1 -O exclude_inode,has_snapshot \2;" Makefile

	# modify the Makefile, change INSTALL_DIR
	sed -ri "s;^(INSTALL_DIR=).*$;\1"$pkgdir"/lib/modules/${_abi_release}/fs/next3;" Makefile

	# modify the Makefile, update the depmod line to only run when root
	# and run it against the $_abi_release kernel version
	sed -ri "s;(/sbin/depmod -a);\[ \`id -u\` = 0 \] \&\& \1 ${_abi_release} || :\n\n\tmkdir -p "$pkgdir"/sbin;" Makefile

	# modify the Makefile, remove the modprobe line
	# modify the Makefile, remove the depmod and modprobe lines
	sed -ri "s;(/sbin/depmod -a);;" Makefile
	sed -ri "s;(/sbin/modprobe next3);;" Makefile

	# modify the Makefile, update the install lines for 'make install'
	sed -ri "s;(install) (.*) (/sbin);\1 -m755 \2 "$pkgdir"\3;" Makefile
	# modify the Makefile to use 'install' from coreutils
	sed -ri "s;(install -T);/bin/\1;" Makefile

	# modify the Makefile to install next3 utils into $pkgdir/sbin
	sed -ri "s;(install) (bin)/(.*) (/sbin);\1 -Dm755 \2/\3 "$pkgdir"\4/\3;" Makefile
}

build() {
	cd "$_builddir"

	# Build Next3
	make KVERS="${_abi_release}" || return 1

	# Test Next3
	sudo make KVERS="${_abi_release}" test || return 1
	make KERNEL="${_abi_release}" || return 1
}

package() {
	cd "$_builddir"

	# Install Next3 into $pkgdir
	make KVERS="${_abi_release}" install || return 1
	make install KERNEL="${_abi_release}" INSTALL_DIR="$pkgdir"/lib/modules/${_abi_release}/fs/next3 || return 1
}

doc() {
-- 
1.7.3.3



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---