source: freewrt/package/libiconv/Makefile@ 8e47882

freewrt_1_0 freewrt_2_0
Last change on this file since 8e47882 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: 2.0 KB
Line 
1# $Id: Makefile 3622 2006-04-12 00:34:26Z nico $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=libiconv
6PKG_VERSION:=1.9.1
7PKG_RELEASE:=1
8PKG_MD5SUM:=0c99a05e0c3c153bac1c960f78711155
9
10PKG_SOURCE_URL:=@GNU/libiconv
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12
13
14include $(TOPDIR)/package/rules.mk
15
16$(eval $(call PKG_template,LIBICONV,libiconv,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
17
18$(WRKBUILD)/.configured:
19 (cd $(WRKBUILD); rm -rf config.cache; \
20 $(TARGET_CONFIGURE_OPTS) \
21 CFLAGS="$(TARGET_CFLAGS)" \
22 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
23 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
24 ./configure \
25 --target=$(GNU_TARGET_NAME) \
26 --host=$(GNU_TARGET_NAME) \
27 --build=$(GNU_HOST_NAME) \
28 --program-prefix="" \
29 --program-suffix="" \
30 --prefix=/usr \
31 --exec-prefix=/usr \
32 --bindir=/usr/bin \
33 --datadir=/usr/share \
34 --includedir=/usr/include \
35 --infodir=/usr/share/info \
36 --libdir=/usr/lib \
37 --libexecdir=/usr/lib \
38 --localstatedir=/var \
39 --mandir=/usr/share/man \
40 --sbindir=/usr/sbin \
41 --sysconfdir=/etc \
42 --disable-nls \
43 --enable-largefile \
44 );
45 touch $@
46
47$(WRKBUILD)/.built:
48 $(MAKE) -C $(WRKBUILD) \
49 CC=$(TARGET_CC)
50 rm -rf $(WRKINST)
51 mkdir -p $(WRKINST)
52 $(MAKE) -C $(WRKBUILD) \
53 libdir="$(WRKINST)/usr/lib" \
54 includedir="$(WRKINST)/usr/include" \
55 install-lib
56 touch $@
57
58$(IPKG_LIBICONV):
59 install -d -m0755 $(IDIR_LIBICONV)/usr/lib
60 $(CP) $(WRKINST)/usr/lib/libiconv.so* $(IDIR_LIBICONV)/usr/lib/
61 chmod 0644 $(IDIR_LIBICONV)/usr/lib/*
62 $(RSTRIP) $(IDIR_LIBICONV)
63 $(IPKG_BUILD) $(IDIR_LIBICONV) $(PACKAGE_DIR)
64
65$(STAGING_DIR)/usr/lib/iconv/libiconv.so: $(WRKBUILD)/.built
66 mkdir -p $(STAGING_DIR)/usr/include/iconv
67 $(CP) $(WRKINST)/usr/include/iconv.h $(STAGING_DIR)/usr/include/iconv
68 mkdir -p $(STAGING_DIR)/usr/lib/iconv
69 $(CP) $(WRKINST)/usr/lib/libiconv.* $(STAGING_DIR)/usr/lib/iconv
70 touch $@
71
72install-dev: $(STAGING_DIR)/usr/lib/iconv/libiconv.so
73
74uninstall-dev:
75 rm -rf \
76 $(STAGING_DIR)/usr/include/iconv \
77 $(STAGING_DIR)/usr/lib/iconv \
78
79compile-targets: install-dev
80clean-targets: uninstall-dev
Note: See TracBrowser for help on using the repository browser.