| 1 | # $Id: Makefile 3719 2006-05-01 11:24:15Z nico $
|
|---|
| 2 |
|
|---|
| 3 | include $(TOPDIR)/rules.mk
|
|---|
| 4 |
|
|---|
| 5 | PKG_NAME:=libxml2
|
|---|
| 6 | PKG_VERSION:=2.6.20
|
|---|
| 7 | PKG_RELEASE:=1
|
|---|
| 8 | PKG_MD5SUM:=8f0b3ce721bda11401e656b90ba4e78c
|
|---|
| 9 |
|
|---|
| 10 | PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
|
|---|
| 11 | ftp://fr.rpmfind.net/pub/libxml/
|
|---|
| 12 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | include $(TOPDIR)/package/rules.mk
|
|---|
| 16 |
|
|---|
| 17 | $(eval $(call PKG_template,LIBXML2,libxml2,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 18 |
|
|---|
| 19 | $(WRKBUILD)/.configured:
|
|---|
| 20 | (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
|
|---|
| 21 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 22 | CFLAGS="$(strip $(TARGET_CFLAGS))" \
|
|---|
| 23 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 24 | LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
|
|---|
| 25 | ./configure \
|
|---|
| 26 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 27 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 28 | --build=$(GNU_HOST_NAME) \
|
|---|
| 29 | --program-prefix="" \
|
|---|
| 30 | --program-suffix="" \
|
|---|
| 31 | --prefix=/usr \
|
|---|
| 32 | --exec-prefix=/usr \
|
|---|
| 33 | --bindir=/usr/bin \
|
|---|
| 34 | --datadir=/usr/share \
|
|---|
| 35 | --includedir=/usr/include \
|
|---|
| 36 | --infodir=/usr/share/info \
|
|---|
| 37 | --libdir=/usr/lib \
|
|---|
| 38 | --libexecdir=/usr/lib \
|
|---|
| 39 | --localstatedir=/var \
|
|---|
| 40 | --mandir=/usr/share/man \
|
|---|
| 41 | --sbindir=/usr/sbin \
|
|---|
| 42 | --sysconfdir=/etc \
|
|---|
| 43 | --enable-largefile \
|
|---|
| 44 | --disable-nls \
|
|---|
| 45 | --enable-shared \
|
|---|
| 46 | --enable-static \
|
|---|
| 47 | --disable-rpath \
|
|---|
| 48 | --with-gnu-ld \
|
|---|
| 49 | --without-c14n \
|
|---|
| 50 | --without-catalog \
|
|---|
| 51 | --without-debug \
|
|---|
| 52 | --without-docbook \
|
|---|
| 53 | --with-html \
|
|---|
| 54 | --without-ftp \
|
|---|
| 55 | --without-http \
|
|---|
| 56 | --without-iconv \
|
|---|
| 57 | --without-iso8859x \
|
|---|
| 58 | --without-legacy \
|
|---|
| 59 | --with-output \
|
|---|
| 60 | --without-pattern \
|
|---|
| 61 | --without-push \
|
|---|
| 62 | --without-python \
|
|---|
| 63 | --with-reader \
|
|---|
| 64 | --without-readline \
|
|---|
| 65 | --without-regexps \
|
|---|
| 66 | --with-sax1 \
|
|---|
| 67 | --with-schemas \
|
|---|
| 68 | --with-threads \
|
|---|
| 69 | --with-tree \
|
|---|
| 70 | --with-valid \
|
|---|
| 71 | --with-writer \
|
|---|
| 72 | --with-xinclude \
|
|---|
| 73 | --with-xpath \
|
|---|
| 74 | --with-xptr \
|
|---|
| 75 | --with-zlib \
|
|---|
| 76 | );
|
|---|
| 77 | touch $@
|
|---|
| 78 |
|
|---|
| 79 | $(WRKBUILD)/.built:
|
|---|
| 80 | rm -rf $(WRKINST)
|
|---|
| 81 | mkdir -p $(WRKINST)
|
|---|
| 82 | $(MAKE) -C $(WRKBUILD) \
|
|---|
| 83 | DESTDIR="$(WRKINST)" \
|
|---|
| 84 | all install
|
|---|
| 85 | touch $@
|
|---|
| 86 |
|
|---|
| 87 | $(IPKG_LIBXML2):
|
|---|
| 88 | install -m0755 -d $(IDIR_LIBXML2)/usr/lib
|
|---|
| 89 | $(CP) $(WRKINST)/usr/lib/libxml2.so.* $(IDIR_LIBXML2)/usr/lib/
|
|---|
| 90 | $(RSTRIP) $(IDIR_LIBXML2)
|
|---|
| 91 | $(IPKG_BUILD) $(IDIR_LIBXML2) $(PACKAGE_DIR)
|
|---|
| 92 |
|
|---|
| 93 | $(STAGING_DIR)/usr/lib/libxml2.so: $(WRKBUILD)/.built
|
|---|
| 94 | mkdir -p $(STAGING_DIR)/usr/bin
|
|---|
| 95 | $(CP) $(WRKINST)/usr/bin/xml2-config $(STAGING_DIR)/usr/bin/
|
|---|
| 96 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 97 | $(CP) $(WRKINST)/usr/include/libxml2 $(STAGING_DIR)/usr/include/
|
|---|
| 98 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 99 | $(CP) $(WRKINST)/usr/lib/libxml2.{a,so*} $(STAGING_DIR)/usr/lib/
|
|---|
| 100 | mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
|---|
| 101 | $(CP) $(WRKINST)/usr/lib/pkgconfig/libxml-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/
|
|---|
| 102 | $(SED) 's,-I$${includedir}/libxml2,,g' $(STAGING_DIR)/usr/bin/xml2-config
|
|---|
| 103 | $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/bin/xml2-config
|
|---|
| 104 | $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xml2-config
|
|---|
| 105 | $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/bin/xml2-config
|
|---|
| 106 | $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR)/usr/bin/xml2-config
|
|---|
| 107 | $(SED) 's,-I$${includedir}/libxml2,,g' $(STAGING_DIR)/usr/lib/pkgconfig/libxml-2.0.pc
|
|---|
| 108 | $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libxml-2.0.pc
|
|---|
| 109 | touch $@
|
|---|
| 110 |
|
|---|
| 111 | install-dev: $(STAGING_DIR)/usr/lib/libxml2.so
|
|---|
| 112 |
|
|---|
| 113 | uninstall-dev:
|
|---|
| 114 | rm -rf \
|
|---|
| 115 | $(STAGING_DIR)/usr/bin/xml2-config \
|
|---|
| 116 | $(STAGING_DIR)/usr/include/libxml2 \
|
|---|
| 117 | $(STAGING_DIR)/usr/lib/libxml2.{a,so*} \
|
|---|
| 118 | $(STAGING_DIR)/usr/lib/pkgconfig/libxml-2.0.pc \
|
|---|
| 119 |
|
|---|
| 120 | compile-targets: install-dev
|
|---|
| 121 | clean-targets: uninstall-dev
|
|---|
| 122 |
|
|---|
| 123 | mostlyclean:
|
|---|
| 124 | make -C $(WRKBUILD) clean
|
|---|
| 125 | rm $(WRKBUILD)/.built
|
|---|
| 126 |
|
|---|