| [c8b93bd] | 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| [475ad56] | 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| [c8b93bd] | 9 | PKG_NAME:= libiconv
|
|---|
| 10 | PKG_VERSION:= 1.9.1
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 0c99a05e0c3c153bac1c960f78711155
|
|---|
| [475ad56] | 13 |
|
|---|
| [c8b93bd] | 14 | PKG_SOURCE_URL:= @GNU/libiconv
|
|---|
| 15 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| [475ad56] | 16 |
|
|---|
| [c8b93bd] | 17 | include $(TOPDIR)/mk/package.mk
|
|---|
| [475ad56] | 18 |
|
|---|
| 19 | $(eval $(call PKG_template,LIBICONV,libiconv,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 20 |
|
|---|
| [d419478] | 21 | $(WRKBUILD)/.configured:
|
|---|
| 22 | (cd $(WRKBUILD); rm -rf config.cache; \
|
|---|
| [475ad56] | 23 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 24 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 25 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 26 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 27 | ./configure \
|
|---|
| 28 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 29 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 30 | --build=$(GNU_HOST_NAME) \
|
|---|
| 31 | --program-prefix="" \
|
|---|
| 32 | --program-suffix="" \
|
|---|
| 33 | --prefix=/usr \
|
|---|
| 34 | --exec-prefix=/usr \
|
|---|
| 35 | --bindir=/usr/bin \
|
|---|
| 36 | --datadir=/usr/share \
|
|---|
| 37 | --includedir=/usr/include \
|
|---|
| 38 | --infodir=/usr/share/info \
|
|---|
| 39 | --libdir=/usr/lib \
|
|---|
| 40 | --libexecdir=/usr/lib \
|
|---|
| 41 | --localstatedir=/var \
|
|---|
| 42 | --mandir=/usr/share/man \
|
|---|
| 43 | --sbindir=/usr/sbin \
|
|---|
| 44 | --sysconfdir=/etc \
|
|---|
| [c57fbc9] | 45 | --disable-nls \
|
|---|
| 46 | --enable-largefile \
|
|---|
| [475ad56] | 47 | );
|
|---|
| 48 | touch $@
|
|---|
| 49 |
|
|---|
| [d419478] | 50 | $(WRKBUILD)/.built:
|
|---|
| 51 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| [475ad56] | 52 | CC=$(TARGET_CC)
|
|---|
| [d419478] | 53 | rm -rf $(WRKINST)
|
|---|
| 54 | mkdir -p $(WRKINST)
|
|---|
| 55 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 56 | libdir="$(WRKINST)/usr/lib" \
|
|---|
| 57 | includedir="$(WRKINST)/usr/include" \
|
|---|
| [475ad56] | 58 | install-lib
|
|---|
| 59 | touch $@
|
|---|
| 60 |
|
|---|
| 61 | $(IPKG_LIBICONV):
|
|---|
| 62 | install -d -m0755 $(IDIR_LIBICONV)/usr/lib
|
|---|
| [d419478] | 63 | $(CP) $(WRKINST)/usr/lib/libiconv.so* $(IDIR_LIBICONV)/usr/lib/
|
|---|
| [475ad56] | 64 | chmod 0644 $(IDIR_LIBICONV)/usr/lib/*
|
|---|
| 65 | $(RSTRIP) $(IDIR_LIBICONV)
|
|---|
| 66 | $(IPKG_BUILD) $(IDIR_LIBICONV) $(PACKAGE_DIR)
|
|---|
| 67 |
|
|---|
| [d419478] | 68 | $(STAGING_DIR)/usr/lib/iconv/libiconv.so: $(WRKBUILD)/.built
|
|---|
| [475ad56] | 69 | mkdir -p $(STAGING_DIR)/usr/include/iconv
|
|---|
| [d419478] | 70 | $(CP) $(WRKINST)/usr/include/iconv.h $(STAGING_DIR)/usr/include/iconv
|
|---|
| [475ad56] | 71 | mkdir -p $(STAGING_DIR)/usr/lib/iconv
|
|---|
| [d419478] | 72 | $(CP) $(WRKINST)/usr/lib/libiconv.* $(STAGING_DIR)/usr/lib/iconv
|
|---|
| [475ad56] | 73 | touch $@
|
|---|
| 74 |
|
|---|
| 75 | install-dev: $(STAGING_DIR)/usr/lib/iconv/libiconv.so
|
|---|
| 76 |
|
|---|
| 77 | uninstall-dev:
|
|---|
| 78 | rm -rf \
|
|---|
| 79 | $(STAGING_DIR)/usr/include/iconv \
|
|---|
| 80 | $(STAGING_DIR)/usr/lib/iconv \
|
|---|
| 81 |
|
|---|
| 82 | compile-targets: install-dev
|
|---|
| 83 | clean-targets: uninstall-dev
|
|---|