packages: add missing conffiles define
[openwrt/svn-archive/archive.git] / utils / ap51-flash / Makefile
1 #
2 # Copyright (C) 2010-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=ap51-flash
10 PKG_REV:=232
11 PKG_VERSION:=r$(PKG_REV)
12 PKG_RELEASE:=2
13
14 PKG_SOURCE_PROTO:=svn
15 PKG_SOURCE_VERSION:=$(PKG_REV)
16 PKG_SOURCE_SUBDIR:=ap51-flash-$(PKG_VERSION)
17 PKG_SOURCE_URL:=http://dev.cloudtrax.com/downloads/svn/ap51-flash/trunk
18 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
19
20 include $(INCLUDE_DIR)/package.mk
21
22 ifeq ($(CONFIG_BIG_ENDIAN),y)
23 STAMP_BUILT:=$(STAMP_BUILT)_big
24 endif
25
26 define Package/ap51-flash
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=A tool for flashing (nearly) all ap51/ap61 based routers
30 URL:=http://dev.cloudtrax.com/wiki/ap51-flash-station
31 endef
32
33 TARGET_EXTRA_CFLAGS:=-DFLASH_FROM_FILE -DNO_LIBPCAP
34 ifeq ($(CONFIG_BIG_ENDIAN),y)
35 TARGET_EXTRA_CFLAGS:=$(TARGET_EXTRA_CFLAGS) -DUIP_CONF_BYTE_ORDER=1234
36 endif
37
38 # pass optimization flags
39 MAKE_FLAGS += \
40 OFLAGS="$(TARGET_CFLAGS)" \
41 EXTRA_CFLAGS="$(TARGET_EXTRA_CFLAGS)" \
42 REVISION="$(PKG_VERSION)" \
43
44 define Package/ap51-flash/install
45 $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d $(1)/usr/sbin \
46 $(1)/usr/lib/ap51-flash
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ap51-flash $(1)/usr/sbin/
48 $(INSTALL_BIN) ./files/ap51-flash.init $(1)/etc/init.d/ap51-flash
49 $(INSTALL_BIN) ./files/ap51-flash.sh $(1)/usr/lib/ap51-flash/ap51-flash.sh
50 $(INSTALL_DATA) ./files/ap51-flash.conf $(1)/etc/config/ap51-flash
51 endef
52
53 define Package/ap51-flash/conffiles
54 /etc/config/ap51-flash
55 endef
56
57 $(eval $(call BuildPackage,ap51-flash))