source: freewrt/package/libxml2/Makefile@ 26f465f

freewrt_1_0 freewrt_2_0
Last change on this file since 26f465f was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

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

  • Property mode set to 100644
File size: 3.5 KB
Line 
1# $Id: Makefile 3719 2006-05-01 11:24:15Z nico $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=libxml2
6PKG_VERSION:=2.6.20
7PKG_RELEASE:=1
8PKG_MD5SUM:=8f0b3ce721bda11401e656b90ba4e78c
9
10PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
11 ftp://fr.rpmfind.net/pub/libxml/
12PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13
14
15include $(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
111install-dev: $(STAGING_DIR)/usr/lib/libxml2.so
112
113uninstall-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
120compile-targets: install-dev
121clean-targets: uninstall-dev
122
123mostlyclean:
124 make -C $(WRKBUILD) clean
125 rm $(WRKBUILD)/.built
126
Note: See TracBrowser for help on using the repository browser.