summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-05-22 18:06:45 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-05-22 18:06:45 -0300
commit3db6b4547b2e25ac2f250781e63754a7319164bb (patch)
tree594f0e0878f571678e4d097ed3babab97ddeaade
parentccd5e7185a586e2ee6303d94600d16ec36e1e5e6 (diff)
2011.05.22 build
-rw-r--r--Makefile10
-rw-r--r--README5
-rwxr-xr-xcreatetorrent15
-rwxr-xr-xdownload-repo.sh3
-rw-r--r--motto1
5 files changed, 30 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0603418..c18e84c 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ PACKAGES="$(shell cat packages.$(ARCH))"
kver_FILE=$(WORKDIR)/root-image/etc/mkinitcpio.d/kernel26.kver
-all: net-iso core-iso
+all: net-iso core-iso torrent
# Rules for each type of image
core-iso: $(COREname)
@@ -82,13 +82,17 @@ $(WORKDIR)/iso/$(INSTALL_DIR)/isomounts: isomounts root-image
# Rule for make the [core] repo packages
core-pkgs:
-# mv core-pkgs $(WORKDIR)/
+ if [ -d core-pkgs ] ; then mv core-pkgs $(WORKDIR)/ ; fi
./download-repo.sh core $(WORKDIR)/core-pkgs/src/core/pkg
# Clean-up all work
clean:
- rm -rf $(WORKDIR) $(NETname) $(COREname)
+ if [ -d work/core-pkgs ] ; then mv work/core-pkgs . ; fi
+ rm -rf $(WORKDIR) $(NETname) $(COREname) $(NETname).torrent $(COREname).torrent
+
+torrent:
+ ./createtorrent $(NETname) $(COREname)
.PHONY: all core-iso net-iso
diff --git a/README b/README
new file mode 100644
index 0000000..1c4a4b8
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
+To create the core and netinstall set of ISOs, run:
+ # make all
+
+To create torrent files for them:
+ $ make torrent
diff --git a/createtorrent b/createtorrent
new file mode 100755
index 0000000..fccf5f5
--- /dev/null
+++ b/createtorrent
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+ARCH=$(uname -m)
+MOTTO=$(cat motto)
+
+for iso in $@; do
+ if [ -f ${iso} ]; then
+ mktorrent -c "${MOTTO}" \
+ -a http://tracker.openbittorrent.com/announce \
+ -a http://tracker.publicbt.com/announce \
+ -v \
+ -w http://repo.parabolagnulinux.org/isos/${ARCH}/$(basename ${iso}) \
+ ${iso}
+ fi
+done
diff --git a/download-repo.sh b/download-repo.sh
index cd4fd88..fb09f01 100755
--- a/download-repo.sh
+++ b/download-repo.sh
@@ -39,12 +39,13 @@ fi
#Ensure we have core/pkgname format, so we don't get crap from other repos
PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/')
+PKGS="$PKGS filesystem initscripts kernel26-libre licenses-libre pacman pacman-mirrorlist-libre your-freedom"
if [ -n "$PKGS" ]; then
baseurl=""
cachedir="/var/cache/pacman/pkg/"
for url in $(/usr/bin/pacman -Sdp $PKGS | grep '://'); do
- baseurl="$(dirname "$url")" #save for later
+ [[ -z $baseurl ]] && baseurl="$(dirname "$url")" #save for later
pkgname="$(basename "$url")"
cachedpkg="$cachedir/$pkgname"
if [ ! -e "$DEST/$pkgname" ]; then
diff --git a/motto b/motto
new file mode 100644
index 0000000..a17096e
--- /dev/null
+++ b/motto
@@ -0,0 +1 @@
+Happy hacking!