add mirror
[openwrt.git] / openwrt / package / popt / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=popt
6 PKG_VERSION:=1.7
7 PKG_RELEASE:=4
8 PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
9
10 PKG_SOURCE_URL:=\
11 ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/ \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17
18 IPKG_LIBPOPT:=$(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
19 IDIR_LIBPOPT:=$(PKG_BUILD_DIR)/ipkg/lib$(PKG_NAME)
20 INFO_LIBPOPT:=$(IPKG_STATE_DIR)/info/lib$(PKG_NAME).list
21
22 $(DL_DIR)/$(PKG_SOURCE):
23 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
24
25 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
26 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
27 # $(PATCH) $(PKG_BUILD_DIR) ./patches
28 touch $(PKG_BUILD_DIR)/.prepared
29
30 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
31 (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
32 $(TARGET_CONFIGURE_OPTS) \
33 CFLAGS="$(TARGET_CFLAGS)" \
34 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
35 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
36 ./configure \
37 --target=$(GNU_TARGET_NAME) \
38 --host=$(GNU_TARGET_NAME) \
39 --build=$(GNU_HOST_NAME) \
40 --program-prefix="" \
41 --program-suffix="" \
42 --prefix=/usr \
43 --exec-prefix=/usr \
44 --bindir=/usr/bin \
45 --datadir=/usr/share \
46 --includedir=/usr/include \
47 --infodir=/usr/share/info \
48 --libdir=/usr/lib \
49 --libexecdir=/usr/lib \
50 --localstatedir=/var \
51 --mandir=/usr/share/man \
52 --sbindir=/usr/sbin \
53 --sysconfdir=/etc \
54 $(DISABLE_NLS) \
55 $(DISABLE_LARGEFILE) \
56 --enable-shared \
57 --enable-static \
58 );
59 touch $(PKG_BUILD_DIR)/.configured
60
61 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
62 $(MAKE) -C $(PKG_BUILD_DIR)
63 touch $(PKG_BUILD_DIR)/.built
64
65 $(STAGING_DIR)/usr/lib/libpopt.so: $(PKG_BUILD_DIR)/.built
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(STAGING_DIR)" \
68 install
69 rm -f $(STAGING_DIR)/usr/lib/libpopt.la
70
71 $(IPKG_LIBPOPT): $(STAGING_DIR)/usr/lib/libpopt.so
72 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBPOPT) lib$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
73 mkdir -p $(IDIR_LIBPOPT)/usr/lib
74 cp -fp $(STAGING_DIR)/usr/lib/libpopt.so.* $(IDIR_LIBPOPT)/usr/lib/
75 $(STRIP) $(IDIR_LIBPOPT)/usr/lib/*.so*
76 mkdir -p $(PACKAGE_DIR)
77 $(IPKG_BUILD) $(IDIR_LIBPOPT) $(PACKAGE_DIR)
78
79 $(INFO_LIBPOPT): $(IPKG_LIBPOPT)
80 $(IPKG) install $(IPKG_LIBPOPT)
81
82 source: $(DL_DIR)/$(PKG_SOURCE)
83 prepare: $(PKG_BUILD_DIR)/.prepared
84 compile: $(IPKG_LIBPOPT)
85 install: $(INFO_LIBPOPT)
86
87 clean:
88 -$(MAKE) -C $(PKG_BUILD_DIR) \
89 DESTDIR="$(STAGING_DIR)" \
90 uninstall
91 rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBPOPT)
This page took 0.049508 seconds and 5 git commands to generate.