diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-08-28 21:35:19 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-08-28 21:35:19 +0200 |
commit | c79befcc1a0791df92460439f933843661db82e2 (patch) | |
tree | 0aaad0895c07007617b9a4c4ef38b59d38a91a1c /mk | |
parent | 89a213bd0f0290c66cdf952d5ea5f089cd56d1e9 (diff) |
add more packages needed for native builds
- add bison,flex,diffutils,autoconf,automake,libtool,m4,gperf
- add {glibc,eglibc,uclibc}-dev packages
- add libz/libncurses development packages
- add PKG_OPTS to setup special options for packages
noremove is needed for uclibc/eglibc/glibc packages, otherwise
needed headers will be removed
slightly tested, still in development
Diffstat (limited to 'mk')
-rw-r--r-- | mk/package.mk | 18 | ||||
-rw-r--r-- | mk/pkg-bottom.mk | 11 |
2 files changed, 21 insertions, 8 deletions
diff --git a/mk/package.mk b/mk/package.mk index 1bfa33e12..318ce3d80 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -109,7 +109,11 @@ build-all-ipkgs: ${_IPKGS_COOKIE} # 4.) dependencies to other packages, $(PKG_DEPENDS) # 5.) description for the package, $(PKG_DESCR) # 6.) section of the package, $(PKG_SECTION) -# +# 7.) special package options +# noscripts -> do not install scripts to $(STAGING_DIR)/target/scripts +# (needed for example for autoconf/automake) +# noremove -> do not remove files from $(STAGING_DIR)/target while +# cleaning (needed for toolchain packages like glibc/eglibc) # should be package format independent and modular in the future define PKG_template IPKG_$(1)= $(PACKAGE_DIR)/$(2)_$(3)_${CPU_ARCH}.ipk @@ -169,12 +173,15 @@ endif done @mkdir -p $${PACKAGE_DIR} '$${STAGING_PARENT}/pkg' \ '$${STAGING_DIR}/scripts' - @if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ +ifneq ($(strip $(7)),noremove) + echo "Calling from package.mk" + if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ cd '$${STAGING_DIR}'; \ while read fn; do \ rm -f "$$$$fn"; \ done <'$${STAGING_PARENT}/pkg/$(1)'; \ fi +endif @rm -f '$${STAGING_PARENT}/pkg/$(1)' @cd $${IDIR_$(1)}; \ x=$$$$(find tmp var -mindepth 1 2>/dev/null); if [[ -n $$$$x ]]; then \ @@ -190,7 +197,7 @@ endif grep -v -e '^usr/share' -e '^usr/man' -e '^usr/info' | \ tee '$${STAGING_PARENT}/pkg/$(1)' | \ cpio -apdlmu --quiet '$${STAGING_DIR}' - @cd '$${STAGING_DIR}'; grep 'usr/lib/.*\.la$$$$' \ + cd '$${STAGING_DIR}'; grep 'usr/lib/.*\.la$$$$' \ '$${STAGING_PARENT}/pkg/$(1)' | while read fn; do \ chmod u+w $$$$fn; \ $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_DIR)/usr/lib,g" $$fn; \ @@ -207,12 +214,15 @@ endif clean-targets: clean-dev-$(1) clean-dev-$(1): - @if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ +ifneq ($(strip $(7)),noremove) + echo "Calling from package.mk clean-dev" + if test -s '$${STAGING_PARENT}/pkg/$(1)'; then \ cd '$${STAGING_DIR}'; \ while read fn; do \ rm -f "$$$$fn"; \ done <'$${STAGING_PARENT}/pkg/$(1)'; \ fi +endif @rm -f '$${STAGING_PARENT}/pkg/$(1)' $$(INFO_$(1)): $$(IPKG_$(1)) diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index ccd629218..36a998a82 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -109,19 +109,19 @@ else @echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2 @exit 1 endif -#ifneq ($(filter confprog,${INSTALL_STYLE}),) @for a in ${WRKINST}/usr/{bin/*-config,lib/pkgconfig/*.pc}; do \ [[ -e $$a ]] || continue; \ $(SED) "s,^prefix=.*,prefix=${STAGING_DIR}/usr," $$a; \ done -#endif @env ${MAKE_ENV} ${MAKE} post-install $(MAKE_TRACE) - @if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ +ifneq ($(strip ${PKG_OPTS}),noremove) + if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ cd '${STAGING_DIR}'; \ while read fn; do \ rm -f "$$fn"; \ done <'${STAGING_PARENT}/pkg/${PKG_NAME}'; \ fi +endif @rm -f '${STAGING_PARENT}/pkg/${PKG_NAME}' @cd ${WRKINST}; \ if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "eglibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libthread-db" ];then \ @@ -144,6 +144,7 @@ endif echo "scripts/$$(basename "$$fn")" \ >>'${STAGING_PARENT}/pkg/${PKG_NAME}'; \ done + echo "calling from pkg-bottom.mk" touch $@ ${_IPKGS_COOKIE}: @@ -195,10 +196,12 @@ package: ${ALL_IPKGS} clean-targets: clean-dev-generic clean-dev-generic: - @if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ +ifneq ($(strip ${PKG_OPTS}),noremove) + if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ cd '${STAGING_DIR}'; \ while read fn; do \ rm -f "$$fn"; \ done <'${STAGING_PARENT}/pkg/${PKG_NAME}'; \ fi +endif @rm -f '${STAGING_PARENT}/pkg/${PKG_NAME}' |