2017-06-04 01:23:28 +08:00
|
|
|
# Contributions from ArchLinux: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/usb_modeswitch
|
|
|
|
|
2011-08-26 07:10:23 +08:00
|
|
|
pkgname=usb-modeswitch
|
|
|
|
_pkgname=usb_modeswitch
|
2017-06-04 01:23:28 +08:00
|
|
|
pkgver=2.5.0
|
2012-08-28 23:17:31 +08:00
|
|
|
pkgrel=1
|
2017-06-04 01:23:28 +08:00
|
|
|
_pkgdata=20170205
|
2011-08-26 07:10:23 +08:00
|
|
|
pkgdesc="Activating switchable USB devices on Linux."
|
2014-01-01 01:51:57 +08:00
|
|
|
arch=('x86_64')
|
2011-08-26 07:10:23 +08:00
|
|
|
url="http://www.draisberghof.de/usb_modeswitch/"
|
|
|
|
license=('GPL3')
|
2014-01-01 01:51:57 +08:00
|
|
|
depends=('libusb' 'tcl')
|
2011-08-26 07:10:23 +08:00
|
|
|
makedepends=('gcc' 'make')
|
|
|
|
conflicts=(usb_modeswitch)
|
|
|
|
replaces=(usb_modeswitch)
|
2012-03-16 22:51:37 +08:00
|
|
|
categories=('system')
|
2011-08-26 07:10:23 +08:00
|
|
|
backup=("etc/$_pkgname.conf")
|
|
|
|
source=("http://www.draisberghof.de/$_pkgname/$pkgname-$pkgver.tar.bz2"
|
|
|
|
"http://www.draisberghof.de/$_pkgname/$pkgname-data-$_pkgdata.tar.bz2"
|
2012-08-28 23:17:31 +08:00
|
|
|
"usb-modeswitch-${pkgver}-device_reference.txt::http://www.draisberghof.de/$_pkgname/device_reference.txt")
|
2017-06-04 01:23:28 +08:00
|
|
|
sha256sums=('31c0be280d49a99ec3dc0be3325bef320d9c04b50714ef0ce1e36a614d687633'
|
|
|
|
'e2dcfd9d28928d8d8f03381571a23442b3c50d48d343bc40a1a07d01662738d1'
|
|
|
|
'846b45a82a31c9755ab86d9c051e706aff445e1e793575b7ae195a4edeb4d594')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "$srcdir"/usb-modeswitch-$pkgver/
|
|
|
|
sed -i 's|/usr/sbin/usb_mode|/usr/bin/usb_mode|g' usb_modeswitch.{conf,tcl,sh}
|
|
|
|
}
|
2012-08-28 23:17:31 +08:00
|
|
|
build() {
|
2017-06-04 01:23:28 +08:00
|
|
|
cd "$srcdir"/usb-modeswitch-$pkgver/
|
2011-08-26 07:10:23 +08:00
|
|
|
make clean
|
2017-06-04 01:23:28 +08:00
|
|
|
make SBINDIR=/usr/bin
|
2011-08-26 07:10:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2017-06-04 01:23:28 +08:00
|
|
|
cd "$srcdir"/usb-modeswitch-$pkgver/
|
2012-08-28 23:17:31 +08:00
|
|
|
|
2017-06-04 01:23:28 +08:00
|
|
|
mkdir -p "$pkgdir"/usr/lib/udev
|
|
|
|
mkdir -p "$pkgdir"/etc
|
|
|
|
mkdir -p "$pkgdir"/usr/share/man/man1
|
|
|
|
mkdir -p "$pkgdir"/usr/lib/systemd/system
|
2011-08-26 07:10:23 +08:00
|
|
|
|
2017-06-04 01:23:28 +08:00
|
|
|
make \
|
|
|
|
DESTDIR="$pkgdir" \
|
|
|
|
UDEVDIR="$pkgdir"/usr/lib/udev \
|
|
|
|
SBINDIR="$pkgdir"/usr/bin \
|
|
|
|
SYSDIR="$pkgdir"/usr/lib/systemd/system \
|
|
|
|
install
|
2011-08-26 07:10:23 +08:00
|
|
|
|
2017-06-04 01:23:28 +08:00
|
|
|
cp "$srcdir"/usb-modeswitch-${pkgver}-device_reference.txt "$pkgdir"/etc/usb_modeswitch.setup
|
2011-08-26 07:10:23 +08:00
|
|
|
|
2017-06-04 01:23:28 +08:00
|
|
|
cd "$srcdir"/usb-modeswitch-data-${_pkgdata}
|
|
|
|
make DESTDIR="$pkgdir" install RULESDIR="$pkgdir"/usr/lib/udev/rules.d
|
2011-08-26 07:10:23 +08:00
|
|
|
}
|