summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Rosen2015-06-22 07:46:23 -0400
committerIdo Rosen2015-06-22 07:46:23 -0400
commit951891d0da4198d9b3cf18117d7c01a138b4eaa4 (patch)
treeb180dc4a9f21a576c6f2f83a7f1d57771801a14a
parent92ab378ecd47e539bb54ccfc64545f9b7e793223 (diff)
downloadaur-951891d0da4198d9b3cf18117d7c01a138b4eaa4.tar.gz
Move depmod to install script.
-rw-r--r--.SRCINFO3
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD9
-rw-r--r--tn40xx.install20
4 files changed, 33 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cd991b922dc..417bd5ea5ee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,6 +3,7 @@ pkgbase = tn40xx
pkgver = 0.3.6.12.1
pkgrel = 1
url = http://www.tehutinetworks.net/
+ install = tn40xx.install
arch = x86_64
license = custom
makedepends = linux-lts-headers
@@ -13,7 +14,9 @@ pkgbase = tn40xx
options = !buildflags
options = staticlibs
source = http://www.tehutinetworks.net/images/UL240756/tn40xx-0.3.6.12.1.tgz
+ source = tn40xx.install
sha512sums = 9d8391a6189f57541ace4ffee3097178a5110587dc86763647b20b8b0376f96da1fa02a3679578e5ce8fe56c56fe6e0bbb9f4fb4c6ef9d7854b11a3713f7830c
+ sha512sums = 911a59684dd0f7fa9913546a90f6144947251f2afe9fd17f6f0b9acb08c93a8dde0df70b2d1cd58de4d60eaffc7b608a978f7f2ffd4f69a22a31319818e806c0
pkgname = tn40xx
diff --git a/.gitignore b/.gitignore
index ca4bee98e34..05e40ddc95b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,5 @@
-tn40xx-*.tgz
+
+/tn40xx-*.tgz
+/*.pkg.tar.xz
+/src/
+/pkg/
diff --git a/PKGBUILD b/PKGBUILD
index 29d0e82801a..dc79462a44a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,9 +16,11 @@ license=('custom')
depends=('linux-lts')
makedepends=('linux-lts-headers')
options=('!libtool' '!strip' '!makeflags' '!buildflags' 'staticlibs')
-source=("http://www.tehutinetworks.net/images/UL240756/${pkgname}-${pkgver}.tgz")
-sha512sums=('9d8391a6189f57541ace4ffee3097178a5110587dc86763647b20b8b0376f96da1fa02a3679578e5ce8fe56c56fe6e0bbb9f4fb4c6ef9d7854b11a3713f7830c')
-#install=
+source=("http://www.tehutinetworks.net/images/UL240756/${pkgname}-${pkgver}.tgz"
+ "tn40xx.install")
+sha512sums=('9d8391a6189f57541ace4ffee3097178a5110587dc86763647b20b8b0376f96da1fa02a3679578e5ce8fe56c56fe6e0bbb9f4fb4c6ef9d7854b11a3713f7830c'
+ '911a59684dd0f7fa9913546a90f6144947251f2afe9fd17f6f0b9acb08c93a8dde0df70b2d1cd58de4d60eaffc7b608a978f7f2ffd4f69a22a31319818e806c0')
+install=tn40xx.install
build() {
cd "${srcdir}/${pkgname}-${pkgver}/"
@@ -37,5 +39,4 @@ package() {
install -m755 ${pkgname}.ko "${pkgdir}/lib/modules/$(uname -r)/drivers/net/"
install -dm755 "${pkgdir}/etc/pm/config.d/"
echo "SUSPEND_MODULES=${pkgname}" > "${pkgdir}/etc/pm/config.d/${pkgname}"
- depmod "$(uname -r)"
}
diff --git a/tn40xx.install b/tn40xx.install
new file mode 100644
index 00000000000..3980bc2ea25
--- /dev/null
+++ b/tn40xx.install
@@ -0,0 +1,20 @@
+
+post_install() {
+ for k in $(cd /lib/modules && /bin/ls); do
+ [ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k"
+ done
+}
+
+post_upgrade() {
+ for k in $(cd /lib/modules && /bin/ls); do
+ [ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k"
+ done
+}
+
+## arg 1: the old package version
+post_remove() {
+ for k in $(cd /lib/modules && /bin/ls | grep '^[0-9]'); do
+ [ -d "/lib/modules/$k/kernel/" ] && depmod -a "$k"
+ done
+
+}