From 3db6b4547b2e25ac2f250781e63754a7319164bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sun, 22 May 2011 18:06:45 -0300 Subject: 2011.05.22 build --- Makefile | 10 +++++++--- README | 5 +++++ createtorrent | 15 +++++++++++++++ download-repo.sh | 3 ++- motto | 1 + 5 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 README create mode 100755 createtorrent create mode 100644 motto 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! -- cgit v1.2.3