summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile25
-rw-r--r--README.md18
-rw-r--r--asp32.in (renamed from asp.in)18
-rw-r--r--man/asp32.1.txt (renamed from man/asp.1.txt)27
-rw-r--r--package.inc.sh6
6 files changed, 63 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore
index e930cc4..87fc143 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
asp
asp.1
+asp32-*.tar.gz*
diff --git a/Makefile b/Makefile
index c545a05..beb3758 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-PACKAGE_NAME = asp
+PACKAGE_NAME = asp32
-VERSION = v3
+VERSION = $(shell git describe --exact-match)
VDEVEL = $(shell test -d .git && git describe --dirty 2>/dev/null)
ifneq "$(VDEVEL)" ""
@@ -10,10 +10,10 @@ endif
PREFIX = /usr/local
BINPROGS = \
- asp
+ asp32
MANPAGES = \
- man/asp.1
+ man/asp32.1
BASH_COMPLETION = \
shell/bash-completion
@@ -42,8 +42,8 @@ doc: $(MANPAGES)
man/%: man/%.txt Makefile
$(V_GEN) a2x -d manpage \
-f manpage \
- -a manversion="$(PACKAGE_NAME) $(VERSION)" \
- -a manmanual="$(PACKAGE_NAME) manual" $<
+ -a manversion="asp32 $(VERSION)" \
+ -a manmanual="asp32 manual" $<
check: $(BINPROGS)
@for f in $(BINPROGS); do bash -O extglob -n $$f; done
@@ -55,11 +55,14 @@ install: all
install -dm755 $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1
install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin
install -m644 $(MANPAGES) $(DESTDIR)$(PREFIX)/share/man/man1
- install -Dm644 $(BASH_COMPLETION) $(DESTDIR)$(PREFIX)/share/bash-completion/completions/asp
- install -Dm644 $(ZSH_COMPLETION) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_asp
+ install -Dm644 $(BASH_COMPLETION) $(DESTDIR)$(PREFIX)/share/bash-completion/completions/asp32
+ install -Dm644 $(ZSH_COMPLETION) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_asp32
dist:
- git archive --format=tar --prefix=$(PACKAGE_NAME)-$(VERSION)/ $(VERSION) | gzip -9 > $(PACKAGE_NAME)-$(VERSION).tar.gz
- gpg --detach-sign --use-agent $(PACKAGE_NAME)-$(VERSION).tar.gz
+ git archive --format=tar --prefix=asp32-$(VERSION)/ $(VERSION) | gzip -9 > asp32-$(VERSION).tar.gz
+ gpg --detach-sign --use-agent asp32-$(VERSION).tar.gz
-.PHONY: all clean install uninstall dist
+upload:
+ scp asp32-$(VERSION).tar.gz asp32-$(VERSION).tar.gz.sig sources.archlinux32.org:sources/
+
+.PHONY: all clean install uninstall dist upload
diff --git a/README.md b/README.md
index 56cdb00..b675f09 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
-# asp
+# asp32
-`asp` is a tool to manage the build source files used to create Arch Linux
+asp32 is a fork of `asp` to work with the Archlinux32 packages.
+It is currently hosted on https://git.archlinux32.org/archlinux32/asp32.
+The original for Archlinux can be found at https://github.com/falconindy/asp.
+
+`asp32` is a tool to manage the build source files used to create Arch Linux
packages. It replaces the `abs` tool, offering more up to date sources (via the
svntogit repositories) and uses a sparse checkout model to conserve diskspace.
This probably won't be interesting to users who want a full checkout (for
@@ -9,26 +13,26 @@ whatever reason that may be).
# Setup
None! Though, it should be noted that the `ASPROOT` environment variable
-will control where `asp` keeps its local git repo. By default, this is
-`${XDG_CACHE_HOME:-$HOME/.cache}/asp`.
+will control where `asp32` keeps its local git repo. By default, this is
+`${XDG_CACHE_HOME:-$HOME/.cache}/asp32`.
# Examples
Get the source files for some packages:
~~~
-asp export pacman testing/systemd extra/pkgfile
+asp32 export pacman testing/systemd extra/pkgfile
~~~
Get a fully functional git checkout of a single package:
~~~
-asp checkout pkgfile
+asp32 checkout pkgfile
~~~
List the repositories a package has been pushed to:
~~~
-asp list-repos pacman
+asp32 list-repos pacman
~~~
diff --git a/asp.in b/asp32.in
index 69c3bdc..b5471d8 100644
--- a/asp.in
+++ b/asp32.in
@@ -1,11 +1,11 @@
#!/bin/bash
ASP_VERSION=@ASP_VERSION@
-ARCH_GIT_REPOS=(packages community)
+ARCH_GIT_REPOS=(packages64 community64 packages32)
OPT_ARCH=$(uname -m)
OPT_FORCE=0
-: "${ASPROOT:=${XDG_CACHE_HOME:-$HOME/.cache}/asp}"
+: "${ASPROOT:=${XDG_CACHE_HOME:-$HOME/.cache}/asp32}"
: "${ASPCACHE:=$ASPROOT/cache}"
m4_include(util.inc.sh)
@@ -15,7 +15,7 @@ m4_include(archweb.inc.sh)
usage() {
cat<<EOF
-asp $ASP_VERSION [OPTIONS...] {COMMAND} ...
+asp32 $ASP_VERSION [OPTIONS...] {COMMAND} ...
Manage build sources for Arch packages.
@@ -132,7 +132,11 @@ initialize() {
if [[ ! -f $ASPROOT/.asp ]]; then
git init -q "$ASPROOT" || return 1
for remote in "${ARCH_GIT_REPOS[@]}"; do
- git remote add "$remote" "https://git.archlinux.org/svntogit/$remote.git" || return 1
+ if [[ "${remote}" = *64 ]]; then
+ git remote add "$remote" "https://git.archlinux.org/svntogit/${remote%64}.git" || return 1
+ elif [[ "${remote}" = *32 ]]; then
+ git remote add "$remote" "https://git.archlinux32.org/archlinux32/${remote%32}.git" || return 1
+ fi
done
touch "$ASPROOT/.asp" || return 1
@@ -300,7 +304,11 @@ action__set-git-protocol() {
esac
for remote in "${ARCH_GIT_REPOS[@]}"; do
- git remote set-url "$remote" "$1://git.archlinux.org/svntogit/$remote.git"
+ if [[ "${remote}" = *64 ]]; then
+ git remote set-url "$remote" "$1://git.archlinux.org/svntogit/${remote%64}.git"
+ elif [[ "${remote}" = *32 ]]; then
+ git remote set-url "$remote" "$1://git.archlinux32.org/archlinux32/${remote%32}.git"
+ fi
done
}
diff --git a/man/asp.1.txt b/man/asp32.1.txt
index 7b984e3..c91f987 100644
--- a/man/asp.1.txt
+++ b/man/asp32.1.txt
@@ -1,23 +1,27 @@
/////
vim:set ts=4 sw=4 syntax=asciidoc noet:
/////
-asp(1)
-======
+asp32(1)
+========
Name
----
-asp - Manage Arch Linux build sources
+asp32 - Manage Arch Linux 32 build sources
Synopsis
--------
-asp [options] command [targets...]
+asp32 [options] command [targets...]
Description
-----------
+The original script can be found at https://github.com/falconindy/asp.
+This is a fork for the specific needs of the Archlinux32 project
+(https://www.archlinux32.org).
+
Manage the version-controlled sources for the build scripts used to create Arch
-Linux packages. This program provides a thin wrapper over the svntogit
-repositories hosted at https://git.archlinux.org. It aims to provide a
-replacement for abs which favors a sparse checkout.
+Linux 32 packages. This program provides a thin wrapper over the svntogit
+repositories hosted at https://git.archlinux.org and https://git.archlinux32.org/archlinux32/packages.
+It aims to provide a replacement for abs which favors a sparse checkout.
Commands
--------
@@ -27,7 +31,7 @@ The following commands are understood:
Create a new git repository containing the full source and history
for each of the given targets. The new repository will pull from the
repository in '$ASPROOT' and must be updated separately after using
- 'asp update'. If a checkout occurs on the same filesystem as '$ASPROOT',
+ 'asp32 update'. If a checkout occurs on the same filesystem as '$ASPROOT',
most of the metadata can be hard linked, making this a relatively cheap
copy.
@@ -112,7 +116,7 @@ Environment
-----------
*ASPROOT*::
Determines where the metadata is stored for locally tracked packages. Defaults
- to '`${XDG_CACHE_HOME:-$HOME/.cache}/asp`'.
+ to '`${XDG_CACHE_HOME:-$HOME/.cache}/asp32`'.
*ASPCACHE*::
Determines where cached data is stored. Defaults to '$ASPROOT/cache'. Data in
@@ -121,3 +125,8 @@ Environment
Authors
-------
Dave Reisner <d@falconindy.com>
+
+Motifications for Archlinux32
+-----------------------------
+Andreas Baumann <mail@andreasbaumann.cc>
+Erich Eckner <arch32@eckner.net>
diff --git a/package.inc.sh b/package.inc.sh
index 1ae9a5b..109a75e 100644
--- a/package.inc.sh
+++ b/package.inc.sh
@@ -153,6 +153,12 @@ package_export() {
log_info 'exporting %s:%s' "$pkgname" "$subtree"
git archive --format=tar "remotes/$remote/packages/$pkgname" "$subtree/" |
tar --transform "s,^$subtree,$pkgname," -xf - "$subtree/"
+ # borrowed from archlinux32/builder/lib/common-functions' mangle_pkgbuild()
+ sed -i '
+ /^arch=[^#]*any/!{
+ /^arch=(/s/(/(i486 i686 pentium3 /
+ }
+ ' "$pkgname/PKGBUILD"
}
package_checkout() {