source: freewrt/package/libxml2/Makefile@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was c8b93bd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

major package Makefile cleanup. remove mostly-clean, add licence header, always use RSTRIP varibale for stripping, rename some init scripts, indent

git-svn-id: svn://www.freewrt.org/trunk/freewrt@600 afb5a338-a214-0410-bd46-81f09a774fd1

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