force pcmcia-cs reconfiguration when the kernel configuration changes
[openwrt/staging/mkresin.git] / package / pcmcia-cs / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=pcmcia-cs
12 PKG_VERSION:=3.2.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=0d6d65be8896eff081aee996049afaa5
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/pcmcia-cs
26 SECTION:=utils
27 CATEGORY:=Utilities
28 DEPENDS:=@PCMCIA_SUPPORT
29 TITLE:=PCMCIA/Cardbus management utilities
30 URL:=http://pcmcia-cs.sourceforge.net/
31 endef
32
33 $(PKG_BUILD_DIR)/.configured: $(LINUX_DIR)/.config
34
35 define Build/Configure
36 ( cd $(PKG_BUILD_DIR); \
37 ./Configure \
38 --noprompt \
39 --kernel="$(LINUX_DIR)" \
40 --target="$(PKG_INSTALL_DIR)" \
41 --arch="$(ARCH)" \
42 --ucc="$(TARGET_CC)" \
43 --uflags="$(TARGET_CFLAGS)" \
44 --srctree \
45 --cardbus \
46 --noapm \
47 --nopnp \
48 --notrust \
49 --nox11 \
50 --rcdir="/etc" \
51 --sysv \
52 )
53 endef
54
55 define Build/Compile
56 rm -rf $(PKG_INSTALL_DIR)
57 mkdir -p $(PKG_INSTALL_DIR)
58 $(call Build/Compile/Default, \
59 CFLAGS="$(TARGET_CFLAGS)" \
60 all install \
61 )
62 endef
63
64 define Package/pcmcia-cs/install
65 $(INSTALL_DIR) $(1)/etc
66 $(CP) $(PKG_INSTALL_DIR)/etc/pcmcia $(1)/etc/
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(CP) $(PKG_INSTALL_DIR)/sbin/cardctl $(1)/usr/sbin/
69 $(CP) $(PKG_INSTALL_DIR)/sbin/cardmgr $(1)/usr/sbin/
70 endef
71
72 $(eval $(call BuildPackage,pcmcia-cs))