Permalink
Browse files

preliminary preseed package added

  • Loading branch information...
1 parent b9cf561 commit b6f0104405b1bfda46e55b49e448e6d5165fb10f @cr cr committed Feb 18, 2011
View
@@ -1,30 +1,41 @@
NAME = piratebox
VERSION = 0.2-4
+VERSIONPS = 0.1-1
ARCH = all
IPK = $(NAME)_$(VERSION)_$(ARCH).ipk
IPKDIR = src
+IPKPS = $(NAME)-preseed_$(VERSIONPS)_$(ARCH).ipk
+IPKPSDIR = src-preseed
.DEFAULT_GOAL = all
$(IPKDIR)/control.tar.gz: $(IPKDIR)/control
tar czf $@ -C $(IPKDIR)/control .
-control: $(IPKDIR)/control.tar.gz
+$(IPKPSDIR)/control.tar.gz: $(IPKPSDIR)/control
+ tar czf $@ -C $(IPKPSDIR)/control .
+control: $(IPKDIR)/control.tar.gz $(IPKPSDIR)/control.tar.gz
$(IPKDIR)/data.tar.gz: $(IPKDIR)/data
tar czf $@ -C $(IPKDIR)/data .
-data: $(IPKDIR)/data.tar.gz
+$(IPKPSDIR)/data.tar.gz: $(IPKPSDIR)/data
+ tar czf $@ -C $(IPKPSDIR)/data .
+data: $(IPKDIR)/data.tar.gz $(IPKPSDIR)/data.tar.gz
$(IPK): $(IPKDIR)/control.tar.gz $(IPKDIR)/data.tar.gz $(IPKDIR)/control $(IPKDIR)/data
tar czf $@ -C $(IPKDIR) control.tar.gz data.tar.gz debian-binary
-
-all: $(IPK)
+$(IPKPS): $(IPKPSDIR)/control.tar.gz $(IPKPSDIR)/data.tar.gz $(IPKPSDIR)/control $(IPKPSDIR)/data
+ tar czf $@ -C $(IPKPSDIR) control.tar.gz data.tar.gz debian-binary
+all: $(IPK) $(IPKPS)
cleanbuild:
-rm -f $(IPKDIR)/control.tar.gz
-rm -f $(IPKDIR)/data.tar.gz
+ -rm -f $(IPKPSDIR)/control.tar.gz
+ -rm -f $(IPKPSDIR)/data.tar.gz
clean: cleanbuild
-rm -f $(IPK)
+ -rm -f $(IPKPS)
.PHONY: all clean
View
@@ -16,6 +16,7 @@ FEATURES:
TODO:
- Test other platforms
- Improve error checking
+ - Does not cleanly update, yet. "opkg remove piratebox" first.
PLEASE HELP:
- I expect mkPirateBox v0.2+ to run on many or even most untested
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,14 @@
+Package: piratebox-preseed
+Version: 0.1-1
+Depends: piratebox (>=0.2-4)
+Provides:
+Source: package/piratebox-preseed
+Section: net
+Status: unknown ok not-installed
+Essential: no
+Priority: optional
+Maintainer: Christiane Ruetten <cr@23bit.net>
+Architecture: all
+Installed-Size: 8192
+Description: Downloads a set of CC or otherwise free files to pre-seed your PirateBox, see http://wiki.daviddarts.com/PirateBox
+
@@ -0,0 +1,24 @@
+#!/bin/ash
+
+# include PirateBox shared functionality
+. /etc/piratebox.common
+
+# wait for USB disk to show up
+pb_usbwait
+
+/etc/init.d/piratebox nodns
+
+if [ -d "$pb_share" ]
+then
+ cd "$pb_share"
+ cat /etc/piratebox.preseed \
+ | while read url filename
+ do
+ wget "$url" -O "$filename"
+ done
+else
+ echo "Your PirateBox is not installed correctly." >&2
+ echo "Remove this package and re-install piratebox." >&2
+ exit 5
+fi
+
@@ -0,0 +1,22 @@
+#!/bin/ash
+
+# include PirateBox shared functionality
+. /etc/piratebox.common
+
+# wait for USB disk to show up
+pb_usbwait
+
+if [ -d "$pb_share" ]
+then
+ cd "$pb_share"
+ cat /etc/piratebox.preseed \
+ | while read url filename
+ do
+ rm -f "$filename"
+ done
+else
+ echo "Your PirateBox is not installed correctly." >&2
+ echo "Remove files manually." >&2
+ exit 5
+fi
+
@@ -0,0 +1 @@
+http://kosmonaut.ugress.com/mpeg3/Ugress-Kosmonaut320.mp3 Ugress - Kosmonaut.mp3
@@ -0,0 +1 @@
+2.0

0 comments on commit b6f0104

Please sign in to comment.