3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=5988e7aeb0ae4dac8d83561265984cc9
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
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
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
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
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
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" \
37 --target
=$(GNU_TARGET_NAME
) \
38 --host
=$(GNU_TARGET_NAME
) \
39 --build
=$(GNU_HOST_NAME
) \
45 --datadir=/usr
/share \
46 --includedir=/usr
/include \
47 --infodir=/usr
/share
/info \
49 --libexecdir
=/usr
/lib \
50 --localstatedir
=/var \
51 --mandir=/usr
/share
/man \
55 $(DISABLE_LARGEFILE
) \
59 touch
$(PKG_BUILD_DIR
)/.configured
61 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
62 $(MAKE
) -C
$(PKG_BUILD_DIR
)
63 touch
$(PKG_BUILD_DIR
)/.built
65 $(STAGING_DIR
)/usr
/lib
/libpopt.so
: $(PKG_BUILD_DIR
)/.built
66 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
67 DESTDIR
="$(STAGING_DIR)" \
69 rm -f
$(STAGING_DIR
)/usr
/lib
/libpopt.la
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
)
79 $(INFO_LIBPOPT
): $(IPKG_LIBPOPT
)
80 $(IPKG
) install $(IPKG_LIBPOPT
)
82 source
: $(DL_DIR
)/$(PKG_SOURCE
)
83 prepare
: $(PKG_BUILD_DIR
)/.prepared
84 compile
: $(IPKG_LIBPOPT
)
85 install: $(INFO_LIBPOPT
)
88 -$(MAKE
) -C
$(PKG_BUILD_DIR
) \
89 DESTDIR
="$(STAGING_DIR)" \
91 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_LIBPOPT
)