diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2009-01-09 20:56:47 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2009-01-09 20:56:47 +0000 |
commit | e367235b460f83e6890a3e1770068c287cf7703b (patch) | |
tree | 52ed83f5ee7087c4e7a91310f87d738a24f14889 /rules/opkg.make | |
parent | bab98d751a761209011c590833f6dd3c82674ad9 (diff) | |
download | ptxdist-e367235b460f83e6890a3e1770068c287cf7703b.tar.gz ptxdist-e367235b460f83e6890a3e1770068c287cf7703b.tar.xz |
* opkg: add initial test version
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9469 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/opkg.make')
-rw-r--r-- | rules/opkg.make | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/rules/opkg.make b/rules/opkg.make new file mode 100644 index 000000000..ced594c8e --- /dev/null +++ b/rules/opkg.make @@ -0,0 +1,129 @@ +# -*-makefile-*- +# $Id: template-make 9053 2008-11-03 10:58:48Z wsa $ +# +# Copyright (C) 2009 by Robert Schwebel +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_OPKG) += opkg + +# +# Paths and names +# +OPKG_VERSION := r180 +OPKG := opkg-$(OPKG_VERSION) +OPKG_SUFFIX := tar.gz +OPKG_URL := http://www.pengutronix.de/software/ptxdist/temporary-src/$(OPKG).$(OPKG_SUFFIX) +OPKG_SOURCE := $(SRCDIR)/$(OPKG).$(OPKG_SUFFIX) +OPKG_DIR := $(BUILDDIR)/$(OPKG) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(OPKG_SOURCE): + @$(call targetinfo) + @$(call get, OPKG) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +$(STATEDIR)/opkg.extract: + @$(call targetinfo) + @$(call clean, $(OPKG_DIR)) + @$(call extract, OPKG) + @$(call patchin, OPKG) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +OPKG_PATH := PATH=$(CROSS_PATH) +OPKG_ENV := $(CROSS_ENV) + +# +# autoconf +# +OPKG_AUTOCONF := \ + $(CROSS_AUTOCONF_USR) \ + --disable-gpg + +$(STATEDIR)/opkg.prepare: + @$(call targetinfo) + @$(call clean, $(OPKG_DIR)/config.cache) + cd $(OPKG_DIR) && \ + $(OPKG_PATH) $(OPKG_ENV) \ + ./configure $(OPKG_AUTOCONF) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/opkg.compile: + @$(call targetinfo) + cd $(OPKG_DIR) && $(OPKG_PATH) $(MAKE) $(PARALLELMFLAGS) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/opkg.install: + @$(call targetinfo) + @$(call install, OPKG) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/opkg.targetinstall: + @$(call targetinfo) + + @$(call install_init, opkg) + @$(call install_fixup, opkg,PACKAGE,opkg) + @$(call install_fixup, opkg,PRIORITY,optional) + @$(call install_fixup, opkg,VERSION,$(OPKG_VERSION)) + @$(call install_fixup, opkg,SECTION,base) + @$(call install_fixup, opkg,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>") + @$(call install_fixup, opkg,DEPENDS,) + @$(call install_fixup, opkg,DESCRIPTION,missing) + + # makes only sense when we --enable-gpg + # @$(call install_copy, opkg, 0, 0, 0755, -, /usr/bin/opkg-key) + @$(call install_copy, opkg, 0, 0, 0755, -, /usr/bin/update-alternatives) + @$(call install_copy, opkg, 0, 0, 0755, -, /usr/bin/opkg-cl) + @$(call install_copy, opkg, 0, 0, 0755, -, /usr/share/opkg/intercept/ldconfig) + @$(call install_copy, opkg, 0, 0, 0755, -, /usr/share/opkg/intercept/depmod) + @$(call install_copy, opkg, 0, 0, 0755, -, /usr/share/opkg/intercept/update-modules) + @$(call install_copy, opkg, 0, 0, 0755, -, /usr/lib/libopkg.so.0.0.0) + @$(call install_link, opkg, libopkg.so.0.0.0, /usr/lib/libopkg.so.0) + @$(call install_link, opkg, libopkg.so.0.0.0, /usr/lib/libopkg.so) + + # opkg tries to write to the OPKG_STATE_DIR_PREFIX, which is /usr/lib/opkg + @$(call install_link, opkg, /tmp, /usr/lib/opkg) + + @$(call install_finish, opkg) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +opkg_clean: + rm -rf $(STATEDIR)/opkg.* + rm -rf $(PKGDIR)/opkg_* + rm -rf $(OPKG_DIR) + +# vim: syntax=make |