Patchwork [1/3] Add an entry in images sub-menu for ipk repository building

login
register
mail settings
Submitter Jérôme Pouiller
Date Jan. 15, 2013, 4:47 p.m.
Message ID <1358268430-2431-2-git-send-email-jezz@sysmic.org>
Download mbox | patch
Permalink /patch/212240/
State Rejected
Headers show

Comments

Jérôme Pouiller - Jan. 15, 2013, 4:47 p.m.
Just add necessary infrastructure.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
 fs/Config.in     |    1 +
 fs/ipk/Config.in |   13 +++++++++++++
 fs/ipk/ipk.mk    |   22 ++++++++++++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 fs/ipk/Config.in
 create mode 100644 fs/ipk/ipk.mk

Patch

diff --git a/fs/Config.in b/fs/Config.in
index da4c5ff..7689cc2 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -11,5 +11,6 @@  source "fs/romfs/Config.in"
 source "fs/squashfs/Config.in"
 source "fs/tar/Config.in"
 source "fs/ubifs/Config.in"
+source "fs/ipk/Config.in"
 
 endmenu
diff --git a/fs/ipk/Config.in b/fs/ipk/Config.in
new file mode 100644
index 0000000..b42c9ab
--- /dev/null
+++ b/fs/ipk/Config.in
@@ -0,0 +1,13 @@ 
+config BR2_TARGET_ROOTFS_IPK_REPO
+	bool "Ipk repository with packages"
+	default y
+	help
+	  Create a repository compatible with opkg/dpkg tools.
+	  
+	  Each selected packages is splitted in 4 parts:
+	     - main package with debug symbols stripped off
+	     - debug symbols
+	     - development files
+	     - documentation files
+	     - locales
+
diff --git a/fs/ipk/ipk.mk b/fs/ipk/ipk.mk
new file mode 100644
index 0000000..8b8d6f2
--- /dev/null
+++ b/fs/ipk/ipk.mk
@@ -0,0 +1,22 @@ 
+#############################################################
+#
+# Generate a repository for opkg
+#
+#############################################################
+
+define ROOTFS_IPK_REPO_CMD
+	mkdir -p $(BINARIES_DIR)/ipk_repository;                                                             \
+	( cd $(BINARIES_DIR)/ipk_repository && dpkg-scanpackages . ) > $(BINARIES_DIR)/ipk_repository/Packages; \
+	gzip < $(BINARIES_DIR)/ipk_repository/Packages      > $(BINARIES_DIR)/ipk_repository/Packages.gz;    \
+	echo "Archive: unstable"                           >> $(BINARIES_DIR)/ipk_repository/Release;        \
+	echo "Origin: Buildroot"                           >> $(BINARIES_DIR)/ipk_repository/Release;        \
+	echo "Label: Buildroot autogenerated repository"   >> $(BINARIES_DIR)/ipk_repository/Release;        \
+	echo "Architecture: $(ARCH)"                       >> $(BINARIES_DIR)/ipk_repository/Release;        \
+	echo "Your repository is ready.";                                                                    \
+	echo "If you use opkg, add this line to your /etc/opkg/buildroot.conf:";                             \
+	echo "   src/gz buildroot file://$(BINARIES_DIR)/ipk_repository";                                    \
+	echo "If you use apt, add this one to /etc/apt/sources.list.d/buildroot.list:";                      \
+	echo "   deb file://$(BINARIES_DIR)/ipk_repository .";
+endef
+
+$(eval $(call ROOTFS_TARGET,ipk_repo))