source: freewrt/package/libdb/Makefile@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 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.2 KB
Line 
1# $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=libdb
6PKG_VERSION:=4.2.52
7PKG_RELEASE:=1
8PKG_MD5SUM:=x
9
10PKG_SOURCE_URL:=ftp://ftp.sleepycat.com/releases/ \
11 http://downloads.sleepycat.com/
12PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
13
14WRKBUILD:=${WRKDIR}/db-$(PKG_VERSION)
15
16include $(TOPDIR)/package/rules.mk
17
18$(eval $(call PKG_template,LIBDB,libdb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
19
20$(WRKBUILD)/.configured:
21 (cd $(WRKBUILD)/build_unix ; \
22 $(TARGET_CONFIGURE_OPTS) \
23 CFLAGS="$(TARGET_CFLAGS)" \
24 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
25 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
26 ../dist/configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --program-prefix="" \
31 --program-suffix="" \
32 --prefix=/usr \
33 --exec-prefix=/usr \
34 --bindir=/usr/bin \
35 --datadir=/usr/share \
36 --includedir=/usr/include \
37 --infodir=/usr/share/info \
38 --libdir=/usr/lib \
39 --libexecdir=/usr/lib \
40 --localstatedir=/var \
41 --mandir=/usr/share/man \
42 --sbindir=/usr/sbin \
43 --sysconfdir=/etc \
44 --disable-nls \
45 --enable-largefile \
46 --enable-shared \
47 --enable-static \
48 --disable-java \
49 --enable-cxx \
50 --disable-posixmutexes \
51 --disable-uimutexes \
52 --disable-tcl \
53 --disable-rpc \
54 --enable-compat185 \
55 --enable-debug \
56 --enable-statistics \
57 --enable-replication \
58 --enable-cryptography \
59 );
60 touch $@
61
62$(WRKBUILD)/.built:
63 rm -rf $(WRKINST)
64 mkdir -p $(WRKINST)
65 $(MAKE) -C $(WRKBUILD)/build_unix \
66 DESTDIR="$(WRKINST)" install
67 touch $@
68
69$(IPKG_LIBDB):
70 install -m0755 -d $(IDIR_LIBDB)/usr/lib
71 $(CP) $(WRKINST)/usr/lib/libdb*.so $(IDIR_LIBDB)/usr/lib/
72 $(RSTRIP) $(IDIR_LIBDB)
73 $(IPKG_BUILD) $(IDIR_LIBDB) $(PACKAGE_DIR)
74
75$(STAGING_DIR)/usr/lib/libdb.so: $(WRKBUILD)/.built
76 mkdir -p $(STAGING_DIR)/usr/include
77 $(CP) $(WRKINST)/usr/include/db.h $(STAGING_DIR)/usr/include/
78 mkdir -p $(STAGING_DIR)/usr/lib
79 $(CP) $(WRKINST)/usr/lib/libdb*.{a,so} $(STAGING_DIR)/usr/lib/
80 touch $(STAGING_DIR)/usr/lib/libdb.so
81
82install-dev: $(STAGING_DIR)/usr/lib/libdb.so
83
84uninstall-dev:
85 rm -rf $(STAGING_DIR)/usr/include/db.h
86 rm -rf $(STAGING_DIR)/usr/lib/libdb*.{a,so}
87
88compile-targets: install-dev
89clean-targets: uninstall-dev
Note: See TracBrowser for help on using the repository browser.