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