This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
wispcar.mk
65 lines (53 loc) · 1.59 KB
/
wispcar.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#########################################################
# wispcar.mk for BAPs
# David Rowe May 2008
#
# usage: make -f wispcar.mk leds
#
#########################################################
include rules.mk
WISPCAR_VERSION=0.1
TARGET_DIR=$(BUILD_DIR)/tmp/wispcar/ipkg/wispcar
PKG_NAME:=wispcar
PKG_VERSION:=$(WISPCAR_VERSION)
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/tmp/wispcar
wispcar:
rm -Rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR)/bin
cp -f src/wispcar src/wispcard $(TARGET_DIR)/bin
chmod u+x $(TARGET_DIR)/bin/wispcard
chmod u+x $(TARGET_DIR)/bin/wispcar
mkdir -p $(TARGET_DIR)/etc/init.d
cp -f files/wispcar.init $(TARGET_DIR)/etc/init.d/wispcar
chmod u+x $(TARGET_DIR)/etc/init.d/wispcar
mkdir -p $(TARGET_DIR)/usr/doc
cp -v doc/wispcar.txt $(TARGET_DIR)/usr/doc
touch $(PKG_BUILD_DIR)/.built
all: wispcar
dirclean:
rm -rf $(WISPCAR_DIR)
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Utilities
TITLE:=Wispcar - Wifi Station Power Controller And Reporter
DESCRIPTION:=\
Controls Wifi Station Power Controller And Reporter hardware \
which provide voltage and current monitoring, watchdog and sleep \
timer functions.
URL:=http://rowetel.com/baps.html
endef
# post installation - add modules.dep entries
define Package/$(PKG_NAME)/postinst
#!/bin/sh
/etc/init.d/wispcar enable
/etc/init.d/wispcar start
endef
# pre-remove - rm modules.dep entries
define Package/$(PKG_NAME)/prerm
#!/bin/sh
/etc/init.d/wispcar stop
/etc/init.d/wispcar disable
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
wispcar-package: wispcar $(PACKAGE_DIR)/$(PKG_NAME)_$(VERSION)_$(PKGARCH).ipk