New package: usb-modeswitch-2.2.0

This commit is contained in:
Enno Boland 2014-12-08 11:23:02 +01:00
parent 4c542c125e
commit 1c8e9d56e6
2 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,60 @@
--- Makefile.old 2014-05-29 20:35:46.000000000 +0200
+++ Makefile 2014-12-08 08:45:45.067710346 +0100
@@ -5,11 +5,11 @@ CFLAGS += -Wall
LIBS = `pkg-config --libs --cflags libusb-1.0`
RM = /bin/rm -f
OBJS = usb_modeswitch.c
-PREFIX = $(DESTDIR)/usr
-ETCDIR = $(DESTDIR)/etc
+PREFIX = /usr
+ETCDIR = /etc
SYSDIR = $(ETCDIR)/systemd/system
UPSDIR = $(ETCDIR)/init
-UDEVDIR = $(DESTDIR)/lib/udev
+UDEVDIR = /lib/udev
SBINDIR = $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man/man1
VPATH = jimtcl
@@ -77,15 +77,15 @@ ums-clean:
# If not, use the dispatcher directly from the udev rule as in previous versions
install-common: $(PROG) usb_modeswitch_dispatcher
- install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
- install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch
- install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
- install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1
- install -D --mode=644 usb_modeswitch_dispatcher.1 $(MANDIR)/usb_modeswitch_dispatcher.1
- install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher
- install -d $(DESTDIR)/var/lib/usb_modeswitch
- test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1
- test -d $(SYSDIR) -a -e /usr/bin/systemctl && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1
+ install -D --mode=755 usb_modeswitch $(DESTDIR)/$(SBINDIR)/usb_modeswitch
+ install -D --mode=755 usb_modeswitch.sh $(DESTDIR)/$(UDEVDIR)/usb_modeswitch
+ install -D --mode=644 usb_modeswitch.conf $(DESTDIR)/$(ETCDIR)/usb_modeswitch.conf
+ install -D --mode=644 usb_modeswitch.1 $(DESTDIR)/$(MANDIR)/usb_modeswitch.1
+ install -D --mode=644 usb_modeswitch_dispatcher.1 $(DESTDIR)/$(MANDIR)/usb_modeswitch_dispatcher.1
+ install -D --mode=755 usb_modeswitch_dispatcher $(DESTDIR)/$(SBINDIR)/usb_modeswitch_dispatcher
+ install -d $(DESTDIR)/var/lib/usb_modeswitch
+ test -d $(DESTDIR)/$(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(DESTDIR)/$(UPSDIR) || test 1
+ test -d $(DESTDIR)/$(SYSDIR) -a -e /usr/bin/systemctl && install --mode=644 usb_modeswitch@.service $(DESTDIR)/$(SYSDIR) || test 1
install: install-script
@@ -96,10 +96,10 @@ install-shared: dispatcher-shared instal
install-static: dispatcher-static install-common
uninstall:
- $(RM) $(SBINDIR)/usb_modeswitch
- $(RM) $(SBINDIR)/usb_modeswitch_dispatcher
- $(RM) $(UDEVDIR)/usb_modeswitch
- $(RM) $(ETCDIR)/usb_modeswitch.conf
- $(RM) $(MANDIR)/usb_modeswitch.1
- $(RM) -R $(DESTDIR)/var/lib/usb_modeswitch
- $(RM) $(SYSDIR)/usb_modeswitch@.service
+ $(RM) $(DESTDIR)/$(SBINDIR)/usb_modeswitch
+ $(RM) $(DESTDIR)/$(SBINDIR)/usb_modeswitch_dispatcher
+ $(RM) $(DESTDIR)/$(UDEVDIR)/usb_modeswitch
+ $(RM) $(DESTDIR)/$(ETCDIR)/usb_modeswitch.conf
+ $(RM) $(DESTDIR)/$(MANDIR)/usb_modeswitch.1
+ $(RM) -R $(DESTDIR)/var/lib/usb_modeswitch
+ $(RM) $(DESTDIR)/$(SYSDIR)/usb_modeswitch@.service

View file

@ -0,0 +1,15 @@
# Template file for 'usb-modeswitch'
pkgname=usb-modeswitch
version=2.2.0
revision=1
build_style=gnu-makefile
short_desc="Mode switching tool for controlling 'multi-mode' USB devices"
maintainer="Enno Boland <eb@s01.de>"
license="GPL-2"
makedepends="libusb-devel"
depends="tcl ${pkgname}-data"
hostmakedepends="pkg-config tcl"
homepage="http://www.draisberghof.de/usb_modeswitch/"
distfiles="http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-2.2.0.tar.bz2"
checksum=2752103de171ed5f6c8d6a6e3e73e16c9ee3e8e394dd39c5991f7680eb908a3a
make_install_args="UDEVDIR=/usr/lib/udev"