| 1 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 2 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 3 |
|
|---|
| 4 | include $(TOPDIR)/rules.mk
|
|---|
| 5 |
|
|---|
| 6 | PKG_NAME:= libnl
|
|---|
| 7 | PKG_VERSION:= 3.11.0
|
|---|
| 8 | PKG_RELEASE:= 1
|
|---|
| 9 | PKG_MD5SUM:= ec7da5ee1d399d841d7c0964575b1a66
|
|---|
| 10 |
|
|---|
| 11 | PKG_SOURCE:= $(PKG_NAME)3_11_0.tar.gz
|
|---|
| 12 | PKG_SOURCE_URL:= https://github.com/thom311/libnl/archive
|
|---|
| 13 |
|
|---|
| 14 | WRKSRC= $(WRKDIR)/$(PKG_NAME)-$(PKG_NAME)3_11_0
|
|---|
| 15 |
|
|---|
| 16 | include $(TOPDIR)/mk/package.mk
|
|---|
| 17 |
|
|---|
| 18 | $(eval $(call PKG_template,LIBNL,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 19 |
|
|---|
| 20 | $(WRKBUILD)/.configured:
|
|---|
| 21 | (cd $(WRKBUILD); ./autogen.sh)
|
|---|
| 22 | (cd $(WRKBUILD); ./configure \
|
|---|
| 23 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 24 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 25 | --build=$(GNU_HOST_NAME) \
|
|---|
| 26 | --program-prefix="" \
|
|---|
| 27 | --program-suffix="" \
|
|---|
| 28 | --prefix=/usr \
|
|---|
| 29 | --exec-prefix=/usr \
|
|---|
| 30 | --bindir=/usr/bin \
|
|---|
| 31 | --datadir=/usr/share \
|
|---|
| 32 | --includedir=/usr/include \
|
|---|
| 33 | --infodir=/usr/share/info \
|
|---|
| 34 | --libdir=/usr/lib \
|
|---|
| 35 | --libexecdir=/usr/lib \
|
|---|
| 36 | --localstatedir=/var \
|
|---|
| 37 | --mandir=/usr/share/man \
|
|---|
| 38 | --sbindir=/usr/sbin \
|
|---|
| 39 | --sysconfdir=/etc \
|
|---|
| 40 | --disable-nls \
|
|---|
| 41 | --disable-static \
|
|---|
| 42 | --disable-cli \
|
|---|
| 43 | );
|
|---|
| 44 | touch $@
|
|---|
| 45 |
|
|---|
| 46 | $(WRKBUILD)/.built:
|
|---|
| 47 | rm -rf $(WRKINST)
|
|---|
| 48 | mkdir -p $(WRKINST)
|
|---|
| 49 | $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CC) \
|
|---|
| 50 | DESTDIR=$(WRKINST) \
|
|---|
| 51 | -C $(WRKBUILD) install
|
|---|
| 52 | touch $@
|
|---|
| 53 |
|
|---|
| 54 | $(IPKG_LIBNL):
|
|---|
| 55 | install -d -m0755 $(IDIR_LIBNL)/etc/libnl
|
|---|
| 56 | $(CP) $(WRKINST)/etc/libnl/* $(IDIR_LIBNL)/etc/libnl
|
|---|
| 57 | install -d -m0755 $(IDIR_LIBNL)/usr/lib
|
|---|
| 58 | $(CP) $(WRKINST)/usr/lib/libnl* $(IDIR_LIBNL)/usr/lib
|
|---|
| 59 | $(RSTRIP) $(IDIR_LIBNL)
|
|---|
| 60 | $(IPKG_BUILD) $(IDIR_LIBNL) $(PACKAGE_DIR)
|
|---|
| 61 |
|
|---|
| 62 | $(STAGING_DIR)/usr/lib/libnl-3.so: $(WRKBUILD)/.built
|
|---|
| 63 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 64 | $(CP) $(WRKINST)/usr/include/libnl3 $(STAGING_DIR)/usr/include/
|
|---|
| 65 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 66 | $(CP) $(WRKINST)/usr/lib/libnl-*so* $(STAGING_DIR)/usr/lib/
|
|---|
| 67 | mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
|---|
| 68 | $(CP) $(WRKINST)/usr/lib/pkgconfig/libnl*.pc $(STAGING_DIR)/usr/lib/pkgconfig/
|
|---|
| 69 |
|
|---|
| 70 | install-dev: $(STAGING_DIR)/usr/lib/libnl-3.so
|
|---|
| 71 |
|
|---|
| 72 | uninstall-dev:
|
|---|
| 73 | rm -rf \
|
|---|
| 74 | $(STAGING_DIR)/usr/include/libnl3 \
|
|---|
| 75 | $(STAGING_DIR)/usr/lib/libnl-*so* \
|
|---|
| 76 | $(STAGING_DIR)/usr/lib/pkgconfig/libnl*.pc
|
|---|
| 77 |
|
|---|
| 78 | compile-targets: install-dev
|
|---|
| 79 | clean-targets: uninstall-dev
|
|---|