3 include $(TOPDIR
)/rules.mk
6 PKG_VERSION
:=2005-04-R1
8 PKG_MD5SUM
:=19b4f192eb11a418ed3f6bf65c1226af
10 PKG_SOURCE_URL
:=http
://www.kismetwireless.net
/code
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 IPKG_SERVER
:=$(PACKAGE_DIR
)/$(PKG_NAME
)-server_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 IDIR_SERVER
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)-server
18 INFO_SERVER
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
)-server.list
20 IPKG_DRONE
:=$(PACKAGE_DIR
)/$(PKG_NAME
)-drone_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
21 IDIR_DRONE
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)-drone
22 INFO_DRONE
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
)-drone.list
24 IPKG_CLIENT
:=$(PACKAGE_DIR
)/$(PKG_NAME
)-client_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
25 IDIR_CLIENT
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)-client
26 INFO_CLIENT
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
)-client.list
30 ifneq ($(BR2_PACKAGE_KISMET_SERVER
),)
31 COMPILE_TARGETS
+=$(IPKG_SERVER
)
33 ifeq ($(BR2_PACLAGE_KISMET_SERVER
),y
)
34 INSTALL_TARGETS
+=$(INFO_SERVER
)
36 ifneq ($(BR2_PACKAGE_KISMET_CLIENT
),)
37 COMPILE_TARGETS
+=$(IPKG_CLIENT
)
39 ifeq ($(BR2_PACLAGE_KISMET_CLIENT
),y
)
40 INSTALL_TARGETS
+=$(INFO_CLIENT
)
42 ifneq ($(BR2_PACKAGE_KISMET_DRONE
),)
43 COMPILE_TARGETS
+=$(IPKG_DRONE
)
45 ifeq ($(BR2_PACLAGE_KISMET_DRONE
),y
)
46 INSTALL_TARGETS
+=$(INFO_DRONE
)
51 $(DL_DIR
)/$(PKG_SOURCE
):
52 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
54 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
55 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
56 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
57 touch
$(PKG_BUILD_DIR
)/.prepared
59 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
60 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
61 $(TARGET_CONFIGURE_OPTS
) \
62 CXXFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -fno-builtin -nostdinc++ -nodefaultlibs" \
63 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include" \
64 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
66 --target
=$(GNU_TARGET_NAME
) \
67 --host
=$(GNU_TARGET_NAME
) \
68 --build
=$(GNU_HOST_NAME
) \
74 --datadir=/usr
/share \
75 --includedir=/usr
/include \
76 --infodir=/usr
/share
/info \
78 --libexecdir
=/usr
/lib \
79 --localstatedir
=/var \
80 --mandir=/usr
/share
/man \
83 --enable-syspcap
=yes \
86 $(DISABLE_LARGEFILE
) \
88 touch
$(PKG_BUILD_DIR
)/.configured
90 $(PKG_BUILD_DIR
)/kismet_server
$(PKG_BUILD_DIR
)/kismet_drone
$(PKG_BUILD_DIR
)/kismet_client
: $(PKG_BUILD_DIR
)/.configured
91 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
93 LIBS
="-L$(STAGING_DIR)/lib -fno-builtin -nostdinc++ -nodefaultlibs -luClibc++ -lc -lm" \
94 CPPFLAGS
="-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include"
96 $(IPKG_SERVER
): $(PKG_BUILD_DIR
)/kismet_server
97 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_SERVER
) kismet-server.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
98 mkdir
-p
$(IDIR_SERVER
)/etc
99 cp .
/files
/ap_manuf
$(IDIR_SERVER
)/etc
/
100 cp .
/files
/client_manuf
$(IDIR_SERVER
)/etc
/
101 cp .
/files
/kismet.conf
$(IDIR_SERVER
)/etc
/
102 echo
'/etc/kismet.conf' > $(IDIR_SERVER
)/CONTROL
/conffiles
103 echo
'/etc/ap_manuf' >> $(IDIR_SERVER
)/CONTROL
/conffiles
104 echo
'/etc/client_manuf' >> $(IDIR_SERVER
)/CONTROL
/conffiles
105 mkdir
-p
$(IDIR_SERVER
)/usr
/sbin
106 cp
$< $(IDIR_SERVER
)/usr
/sbin
/
107 $(STRIP
) $(IDIR_SERVER
)/usr
/sbin
/*
108 mkdir
-p
$(PACKAGE_DIR
)
109 $(IPKG_BUILD
) $(IDIR_SERVER
) $(PACKAGE_DIR
)
111 $(INFO_SERVER
): $(IPKG_SERVER
)
112 $(IPKG
) install $(IPKG_SERVER
)
114 $(IPKG_DRONE
): $(PKG_BUILD_DIR
)/kismet_drone
115 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_DRONE
) kismet-drone.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
116 mkdir
-p
$(IDIR_DRONE
)/etc
117 cp .
/files
/kismet_drone.conf
$(IDIR_DRONE
)/etc
/
118 echo
'/etc/kismet_drone.conf' > $(IDIR_DRONE
)/CONTROL
/conffiles
119 mkdir
-p
$(IDIR_DRONE
)/usr
/sbin
120 cp
$< $(IDIR_DRONE
)/usr
/sbin
/
121 $(STRIP
) $(IDIR_DRONE
)/usr
/sbin
/*
122 mkdir
-p
$(PACKAGE_DIR
)
123 $(IPKG_BUILD
) $(IDIR_DRONE
) $(PACKAGE_DIR
)
125 $(INFO_DRONE
): $(IPKG_DRONE
)
126 $(IPKG
) install $(IPKG_DRONE
)
128 $(IPKG_CLIENT
): $(PKG_BUILD_DIR
)/kismet_client
129 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_CLIENT
) kismet-client.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
130 mkdir
-p
$(IDIR_CLIENT
)/etc
131 cp .
/files
/ap_manuf
$(IDIR_CLIENT
)/etc
/
132 cp .
/files
/client_manuf
$(IDIR_CLIENT
)/etc
/
133 cp .
/files
/kismet.conf
$(IDIR_CLIENT
)/etc
/
134 cp .
/files
/kismet_ui.conf
$(IDIR_CLIENT
)/etc
/
135 echo
'/etc/kismet.conf' > $(IDIR_CLIENT
)/CONTROL
/conffiles
136 echo
'/etc/kismet_ui.conf' >> $(IDIR_CLIENT
)/CONTROL
/conffiles
137 echo
'/etc/ap_manuf' >> $(IDIR_CLIENT
)/CONTROL
/conffiles
138 echo
'/etc/client_manuf' >> $(IDIR_CLIENT
)/CONTROL
/conffiles
139 mkdir
-p
$(IDIR_CLIENT
)/usr
/sbin
140 cp
$< $(IDIR_CLIENT
)/usr
/sbin
/
141 $(STRIP
) $(IDIR_CLIENT
)/usr
/sbin
/*
142 mkdir
-p
$(PACKAGE_DIR
)
143 $(IPKG_BUILD
) $(IDIR_CLIENT
) $(PACKAGE_DIR
)
145 $(INFO_CLIENT
): $(IPKG_CLIENT
)
146 $(IPKG
) install $(IPKG_CLIENT
)
148 source
: $(DL_DIR
)/$(PKG_SOURCE
)
149 prepare
: $(PKG_BUILD_DIR
)/.prepared
150 compile
: $(COMPILE_TARGETS
)
151 install: $(INSTALL_TARGETS
)
154 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_KISMET
)