| [c8b93bd] | 1 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 2 | # material, please see the LICENCE file in the top-level directory
|
|---|
| [475ad56] | 3 |
|
|---|
| 4 | include $(TOPDIR)/rules.mk
|
|---|
| 5 |
|
|---|
| [c8b93bd] | 6 | PKG_NAME:= hostapd
|
|---|
| [cef4905] | 7 | PKG_VERSION:= 2.11
|
|---|
| [c8b93bd] | 8 | PKG_RELEASE:= 1
|
|---|
| [cef4905] | 9 | PKG_MD5SUM:= 7c1d9203f575a4de7360b907df7aaccd
|
|---|
| [475ad56] | 10 |
|
|---|
| [cef4905] | 11 | PKG_SOURCE_URL:= https://w1.fi/releases
|
|---|
| [475ad56] | 12 |
|
|---|
| [c8b93bd] | 13 | include $(TOPDIR)/mk/package.mk
|
|---|
| [475ad56] | 14 |
|
|---|
| 15 | define PKG_build
|
|---|
| 16 |
|
|---|
| [c04ece1] | 17 | ifneq ($(FWRT_PACKAGE_$(1)),)
|
|---|
| [d419478] | 18 | BUILD_TARGETS += $(WRKINST)/$(2)/hostapd
|
|---|
| [475ad56] | 19 | endif
|
|---|
| 20 |
|
|---|
| [d419478] | 21 | $(WRKINST)/$(2)/hostapd: $(WRKBUILD)/.prepared
|
|---|
| [cef4905] | 22 | -$(MAKE) -C $(WRKBUILD)/hostapd clean
|
|---|
| 23 | $(CP) ./files/$(2).config $(WRKBUILD)/hostapd/.config
|
|---|
| 24 | $(MAKE) -C $(WRKBUILD)/hostapd \
|
|---|
| [475ad56] | 25 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 26 | OPTFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| [cef4905] | 27 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| [475ad56] | 28 | LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| 29 | hostapd
|
|---|
| [d419478] | 30 | mkdir -p $(WRKINST)/$(2)
|
|---|
| [cef4905] | 31 | $(CP) $(WRKBUILD)/hostapd/hostapd $(WRKINST)/$(2)/
|
|---|
| 32 | $(CP) $(WRKBUILD)/hostapd/hostapd.conf $(WRKINST)/$(2)/
|
|---|
| [475ad56] | 33 | touch $$@
|
|---|
| 34 |
|
|---|
| [d419478] | 35 | $$(IPKG_$(1)): $(WRKINST)/$(2)/hostapd
|
|---|
| [475ad56] | 36 | install -m0755 -d $$(IDIR_$(1))/etc
|
|---|
| 37 | install -m0755 -d $$(IDIR_$(1))/usr/sbin
|
|---|
| [d419478] | 38 | install -m0755 $(WRKINST)/$(2)/hostapd $$(IDIR_$(1))/usr/sbin/
|
|---|
| [cef4905] | 39 | install -m0755 $(WRKINST)/$(2)/hostapd.conf $$(IDIR_$(1))/etc
|
|---|
| [475ad56] | 40 | $(RSTRIP) $$(IDIR_$(1))
|
|---|
| 41 | $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
|
|---|
| 42 |
|
|---|
| 43 | endef
|
|---|
| 44 |
|
|---|
| 45 | $(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 46 | $(eval $(call PKG_template,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 47 | $(eval $(call PKG_template,HOSTAPD_UTILS,hostapd-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 48 |
|
|---|
| 49 | $(eval $(call PKG_build,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 50 | $(eval $(call PKG_build,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 51 |
|
|---|
| [d419478] | 52 | $(WRKBUILD)/.configured:
|
|---|
| 53 | $(CP) ./files/hostapd.config $(WRKBUILD)/.config
|
|---|
| [475ad56] | 54 | touch $@
|
|---|
| 55 |
|
|---|
| [d419478] | 56 | $(WRKBUILD)/.built: $(BUILD_TARGETS)
|
|---|
| [cef4905] | 57 | $(MAKE) -C $(WRKBUILD)/src \
|
|---|
| [475ad56] | 58 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 59 | OPTFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| [cef4905] | 60 | CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
|---|
| [475ad56] | 61 | LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
|---|
| [cef4905] | 62 | all
|
|---|
| [475ad56] | 63 | touch $@
|
|---|
| 64 |
|
|---|
| [d419478] | 65 | $(IPKG_HOSTAPD_UTILS): $(WRKBUILD)/.built
|
|---|
| [475ad56] | 66 | install -m0755 -d $(IDIR_HOSTAPD_UTILS)/usr/sbin
|
|---|
| [d419478] | 67 | install -m0755 $(WRKBUILD)/hostapd_cli $(IDIR_HOSTAPD_UTILS)/usr/sbin/
|
|---|
| [475ad56] | 68 | $(RSTRIP) $(IDIR_HOSTAPD_UTILS)
|
|---|
| 69 | $(IPKG_BUILD) $(IDIR_HOSTAPD_UTILS) $(PACKAGE_DIR)
|
|---|