diff options
-rw-r--r-- | package/system/opkg/Makefile | 47 | ||||
-rw-r--r-- | package/system/opkg/files/opkg-smime.conf | 7 | ||||
-rw-r--r-- | package/system/opkg/patches/007-force_static.patch | 16 |
3 files changed, 56 insertions, 14 deletions
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 6407ab451f..eb3b10a776 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -11,13 +11,14 @@ include $(INCLUDE_DIR)/version.mk PKG_NAME:=opkg PKG_REV:=618 PKG_VERSION:=$(PKG_REV) -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_SUBDIR:=opkg-$(PKG_VERSION) PKG_SOURCE_URL:=http://opkg.googlecode.com/svn/trunk/ PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_FIXUP:=autoreconf PKG_REMOVE_FILES = autogen.sh aclocal.m4 @@ -31,15 +32,15 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk -define Package/opkg +define Package/opkg/Default SECTION:=base CATEGORY:=Base system - TITLE:=opkg package management system + TITLE:=opkg package manager MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org> URL:=http://wiki.openmoko.org/wiki/Opkg endef -define Package/opkg/description +define Package/opkg/Default/description Lightweight package management system opkg is the opkg Package Management System, for handling installation and removal of packages on a system. It can @@ -49,10 +50,35 @@ define Package/opkg/description opkg knows how to install both .ipk and .deb packages. endef +define Package/opkg + $(call Package/opkg/Default) + VARIANT:=unsigned +endef + +define Package/opkg/description + $(call Package/opkg/Default/description) +endef + define Package/opkg/conffiles /etc/opkg.conf endef + +define Package/opkg-smime + $(call Package/opkg/Default) + TITLE+= (with S/MIME signature support) + DEPENDS+=+libopenssl + VARIANT:=smime +endef + +define Package/opkg-smime/description + $(call Package/opkg/Default/description) + + This package allows the Package index to be verified with S/MIME. +endef + +Package/opkg-smime/conffiles = $(Package/opkg/conffiles) + TARGET_CFLAGS += $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds) TARGET_CFLAGS += -ffunction-sections -fdata-sections EXTRA_CFLAGS += $(TARGET_CPPFLAGS) @@ -63,21 +89,29 @@ CONFIGURE_ARGS += \ --with-opkgetcdir=/etc \ --with-opkglockfile=/var/lock/opkg.lock +ifeq ($(BUILD_VARIANT),smime) + CONFIGURE_ARGS += --enable-openssl +endif + MAKE_FLAGS = \ CC="$(TARGET_CC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ HOST_CPU="$(PKGARCH)" \ LDFLAGS="-Wl,--gc-sections" \ -define Package/opkg/install +define Package/opkg/Default/install $(INSTALL_DIR) $(1)/usr/lib/opkg $(INSTALL_DIR) $(1)/bin $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/ + $(INSTALL_DATA) ./files/opkg$(2).conf $(1)/etc/opkg.conf $(VERSION_SED) $(1)/etc/opkg.conf $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg endef +Package/opkg/install = $(call Package/opkg/Default/install,$(1),) +Package/opkg-smime/install = $(call Package/opkg/Default/install,$(1),-smime) + + define Build/InstallDev mkdir -p $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libopkg $(1)/usr/include/ @@ -99,4 +133,5 @@ define Host/Install endef $(eval $(call BuildPackage,opkg)) +$(eval $(call BuildPackage,opkg-smime)) $(eval $(call HostBuild)) diff --git a/package/system/opkg/files/opkg-smime.conf b/package/system/opkg/files/opkg-smime.conf new file mode 100644 index 0000000000..103f231842 --- /dev/null +++ b/package/system/opkg/files/opkg-smime.conf @@ -0,0 +1,7 @@ +src/gz %n %U +dest root / +dest ram /tmp +lists_dir ext /var/opkg-lists +option overlay_root /overlay +option check_signature 1 +option signature_ca_path /etc/ssl/certs/ diff --git a/package/system/opkg/patches/007-force_static.patch b/package/system/opkg/patches/007-force_static.patch index 80a9815a8e..38cdb7a869 100644 --- a/package/system/opkg/patches/007-force_static.patch +++ b/package/system/opkg/patches/007-force_static.patch @@ -1,6 +1,6 @@ --- a/libopkg/Makefile.am +++ b/libopkg/Makefile.am -@@ -38,16 +38,10 @@ if HAVE_SHA256 +@@ -38,16 +38,10 @@ opkg_util_sources += sha256.c sha256.h endif @@ -19,10 +19,10 @@ - - - -+libopkg_a_LIBADD = $(top_builddir)/libbb/libbb.a $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS) ++libopkg_a_LIBADD = $(top_builddir)/libbb/libbb.a --- a/libbb/Makefile.am +++ b/libbb/Makefile.am -@@ -2,9 +2,9 @@ HOST_CPU=@host_cpu@ +@@ -2,9 +2,9 @@ BUILD_CPU=@build_cpu@ ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"$(HOST_CPU)\" -DBUILD_CPU=@build_cpu@ @@ -36,7 +36,7 @@ wfopen.c \ --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -4,11 +4,11 @@ AM_CFLAGS = $(ALL_CFLAGS) -Wall -g -O3 - +@@ -4,11 +4,11 @@ #noinst_PROGRAMS = libopkg_test opkg_active_list_test noinst_PROGRAMS = libopkg_test @@ -50,22 +50,22 @@ #opkg_extract_test_SOURCES = opkg_extract_test.c #opkg_extract_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir) -@@ -16,7 +16,7 @@ noinst_PROGRAMS = libopkg_test +@@ -16,7 +16,7 @@ #opkg_active_list_test_SOURCES = opkg_active_list_test.c #opkg_active_list_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir) -libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.la -+libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.a $(top_builddir)/libbb/libbb.a ++libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.a $(top_builddir)/libbb/libbb.a $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS) libopkg_test_SOURCE = libopkg_test.c libopkg_test_LDFLAGS = -static --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -2,5 +2,5 @@ AM_CFLAGS = -I${top_srcdir}/libopkg ${AL +@@ -2,5 +2,5 @@ bin_PROGRAMS = opkg-cl opkg_cl_SOURCES = opkg-cl.c -opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.la \ - $(top_builddir)/libbb/libbb.la +opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.a \ -+ $(top_builddir)/libbb/libbb.a ++ $(top_builddir)/libbb/libbb.a $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS) |