| 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.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= libgpg-error
|
|---|
| 10 | PKG_VERSION:= 1.0
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= ff409db977e4a4897aa09ea420a28a2f
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= ftp://ftp.gnupg.org/gcrypt/libgpg-error/ \
|
|---|
| 15 | http://mirrors.rootmode.com/ftp.gnupg.org/libgpg-error/ \
|
|---|
| 16 | http://gulus.usherbrooke.ca/pub/appl/GnuPG/libgpg-error/ \
|
|---|
| 17 | http://gnupg.unixmexico.org/ftp/libgpg-error/
|
|---|
| 18 | PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 19 |
|
|---|
| 20 | include $(TOPDIR)/mk/package.mk
|
|---|
| 21 |
|
|---|
| 22 | $(eval $(call PKG_template,LIBGPG_ERROR,libgpg-error,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 23 |
|
|---|
| 24 | $(WRKBUILD)/.configured:
|
|---|
| 25 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 26 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 27 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 28 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 29 | LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
|
|---|
| 30 | ./configure \
|
|---|
| 31 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 32 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 33 | --build=$(GNU_HOST_NAME) \
|
|---|
| 34 | --program-prefix="" \
|
|---|
| 35 | --program-suffix="" \
|
|---|
| 36 | --prefix=/usr \
|
|---|
| 37 | --exec-prefix=/usr \
|
|---|
| 38 | --bindir=/usr/bin \
|
|---|
| 39 | --datadir=/usr/share \
|
|---|
| 40 | --includedir=/usr/include \
|
|---|
| 41 | --infodir=/usr/share/info \
|
|---|
| 42 | --libdir=/usr/lib \
|
|---|
| 43 | --libexecdir=/usr/lib \
|
|---|
| 44 | --localstatedir=/var \
|
|---|
| 45 | --mandir=/usr/share/man \
|
|---|
| 46 | --sbindir=/usr/sbin \
|
|---|
| 47 | --sysconfdir=/etc \
|
|---|
| 48 | --disable-nls \
|
|---|
| 49 | --enable-largefile \
|
|---|
| 50 | --enable-shared \
|
|---|
| 51 | --enable-static \
|
|---|
| 52 | --disable-rpath \
|
|---|
| 53 | );
|
|---|
| 54 | touch $@
|
|---|
| 55 |
|
|---|
| 56 | $(WRKBUILD)/.built:
|
|---|
| 57 | rm -rf $(WRKINST)
|
|---|
| 58 | mkdir -p $(WRKINST)
|
|---|
| 59 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 60 | DESTDIR="$(WRKINST)" \
|
|---|
| 61 | all install
|
|---|
| 62 | touch $@
|
|---|
| 63 |
|
|---|
| 64 | $(IPKG_LIBGPG_ERROR):
|
|---|
| 65 | install -m0755 -d $(IDIR_LIBGPG_ERROR)/usr/lib
|
|---|
| 66 | $(CP) $(WRKINST)/usr/lib/libgpg-error.so.* $(IDIR_LIBGPG_ERROR)/usr/lib/
|
|---|
| 67 | $(RSTRIP) $(IDIR_LIBGPG_ERROR)
|
|---|
| 68 | $(IPKG_BUILD) $(IDIR_LIBGPG_ERROR) $(PACKAGE_DIR)
|
|---|
| 69 |
|
|---|
| 70 | $(STAGING_DIR)/usr/lib/libgpg-error.so: $(WRKBUILD)/.built
|
|---|
| 71 | mkdir -p $(STAGING_DIR)/usr/bin
|
|---|
| 72 | $(CP) $(WRKINST)/usr/bin/gpg-error-config $(STAGING_DIR)/usr/bin/
|
|---|
| 73 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 74 | $(CP) $(WRKINST)/usr/include/gpg-error.h $(STAGING_DIR)/usr/include/
|
|---|
| 75 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 76 | $(CP) $(WRKINST)/usr/lib/libgpg-error.{a,so*} $(STAGING_DIR)/usr/lib/
|
|---|
| 77 | mkdir -p $(STAGING_DIR)/usr/share/aclocal
|
|---|
| 78 | $(CP) $(WRKINST)/usr/share/aclocal/gpg-error.m4 $(STAGING_DIR)/usr/share/aclocal/
|
|---|
| 79 | touch $@
|
|---|
| 80 |
|
|---|
| 81 | install-dev: $(STAGING_DIR)/usr/lib/libgpg-error.so
|
|---|
| 82 |
|
|---|
| 83 | uninstall-dev:
|
|---|
| 84 | rm -rf \
|
|---|
| 85 | $(STAGING_DIR)/usr/bin/gpg-error-config \
|
|---|
| 86 | $(STAGING_DIR)/usr/include/gpg-error.h \
|
|---|
| 87 | $(STAGING_DIR)/usr/lib/libgpg-error.{a,so*} \
|
|---|
| 88 | $(STAGING_DIR)/usr/share/aclocal/gpg-error.m4 \
|
|---|
| 89 |
|
|---|
| 90 | compile-targets: install-dev
|
|---|
| 91 | clean-targets: uninstall-dev
|
|---|