diff options
author | Nick Østergaard | 2014-06-08 12:22:03 +0200 |
---|---|---|
committer | Nick Østergaard | 2014-06-08 12:22:03 +0200 |
commit | 66461fecea6fe24da9d84824c2cbdec780a10e8f (patch) | |
tree | 48333e0e6de63998aeefa490a56cf4b9dc851245 | |
download | aur-66461fecea6fe24da9d84824c2cbdec780a10e8f.tar.gz |
Add kicad-pretty-git
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | kicad.install | 5 |
3 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..00a94fb90451 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = kicad-pretty-git + pkgdesc = KiCad .pretty repos + pkgver = 1 + pkgrel = 1 + install = kicad.install + arch = any + license = GPL + makedepends = git + options = !strip + +pkgname = kicad-pretty-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c7980376b5e8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Nick Østergaard <oe.nick at gmail dot com> +pkgname=kicad-pretty-git +pkgver=1 +pkgrel=1 +pkgdesc="KiCad .pretty repos" +arch=('any') +url="" +license=('GPL') +makedepends=('git') +options=('!strip') +install='kicad.install' + + +package() { + cd "$srcdir" + msg "Fetching list of available pretty repos..." + PRETTY_REPOS=`curl https://api.github.com/orgs/KiCad/repos?per_page=2000 2> /dev/null \ + | grep full_name | grep pretty \ + | sed -r 's:.+ "KiCad/(.+)",:\1:'` + + echo $PRETTY_REPOS + + # Fetching the pretty repos. This should possibly be a bit more + # intelligent, such that it will remove orphaned repos. + for repo in $PRETTY_REPOS; do + if [ ! -e "$srcdir/$repo" ]; then + msg "Cloning $repo" + git clone "https://github.com/KiCad/$repo" "$srcdir/$repo" + else + msg "Updating $repo" + cd "$srcdir/$repo" + git pull + fi + done + + mkdir -p "$pkgdir/usr/share/kicad/footprints" + + for repo in $PRETTY_REPOS; do + cp -r "$srcdir/$repo" "$pkgdir/usr/share/kicad/footprints" + done + + wget -q https://raw.githubusercontent.com/KiCad/kicad-library/master/template/fp-lib-table.for-pretty \ + -O "$pkgdir/usr/share/kicad/footprints/fp-lib-table" +} + +# vim:set ts=2 sw=2 et: diff --git a/kicad.install b/kicad.install new file mode 100644 index 000000000000..60ca7a77497c --- /dev/null +++ b/kicad.install @@ -0,0 +1,5 @@ +post_install() { + echo "Remember to set KISYSMOD environment variable to:" + echo " KISYSMOD="/usr/share/kicad/footprints"" + echo "And copy /usr/share/kicad/footprints/fp-lib-table to \$HOME" +} |