From 2acdc5284a60deb3ab7b97f465703a5a53402feb Mon Sep 17 00:00:00 2001 From: brent s Date: Wed, 16 Nov 2016 02:28:42 -0500 Subject: [PATCH] python rewrite for adding package tested and now works (release only, vcs untested) --- _bin/new_package.py | 3 ++- _docs/PKGBUILD.templates.d.python/pre-commit.hook.sh | 2 -- _docs/PKGBUILD.templates.d.python/release/02.pkgmeta.j2 | 2 +- _docs/PKGBUILD.templates.d.python/release/03.sources.j2 | 2 +- _docs/PKGBUILD.templates.d.python/srcinfo.j2 | 9 +++------ _docs/PKGBUILD.templates.d.python/vcs/02.pkgmeta.j2 | 2 +- python-snakeoil | 2 +- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/_bin/new_package.py b/_bin/new_package.py index 92af608..93bc705 100755 --- a/_bin/new_package.py +++ b/_bin/new_package.py @@ -192,7 +192,7 @@ def aur_create(pkg): ## ADD THE SUBMODULE TO THE MAIN AUR TREE ## def aur_submodule(pkg): aur_pkgs_repo = git.Repo(aur_pkgs_dir) - aur_pkgs_repo.create_submodule(pkg['name'],aur_pkgs_dir + '/' + pkg['name'], url='aur@aur.archlinux.org:' + pkg['name']) + aur_pkgs_repo.create_submodule(pkg['name'], aur_pkgs_dir + '/' + pkg['name'], url='aur@aur.archlinux.org:' + pkg['name']) aur_pkgs_repo.index.commit("adding {0}".format(pkg['name'])) # Comment me out if you don't have access to upstream: aur_pkgs_repo.remotes.origin.push() @@ -215,3 +215,4 @@ if __name__ == "__main__": sanity_checks() aur_create(pkg) aur_submodule(pkg) + print("Done! Successfully added {0} to the AUR and your local AUR meta-repository.".format(pkg['name']) diff --git a/_docs/PKGBUILD.templates.d.python/pre-commit.hook.sh b/_docs/PKGBUILD.templates.d.python/pre-commit.hook.sh index 5320b30..4100929 100755 --- a/_docs/PKGBUILD.templates.d.python/pre-commit.hook.sh +++ b/_docs/PKGBUILD.templates.d.python/pre-commit.hook.sh @@ -1,7 +1,5 @@ #!/bin/bash -#!/bin/bash - /usr/bin/mksrcinfo git add .SRCINFO diff --git a/_docs/PKGBUILD.templates.d.python/release/02.pkgmeta.j2 b/_docs/PKGBUILD.templates.d.python/release/02.pkgmeta.j2 index 18fb24e..5283d78 100644 --- a/_docs/PKGBUILD.templates.d.python/release/02.pkgmeta.j2 +++ b/_docs/PKGBUILD.templates.d.python/release/02.pkgmeta.j2 @@ -4,7 +4,7 @@ pkgrel=1 pkgdesc="{{ pkg['desc'] }}" arch=( 'i686' 'x86_64' ) url="{{ pkg['site'] }}" -license=({% for license in pkg['license'] %}'{{ license }}' {% endfor %}){% if pkg['deps'] is defined and pkg['deps']|length > 0 %} +license=( {% for license in pkg['license'] %}'{{ license }}' {% endfor %}){% if pkg['deps'] is defined and pkg['deps']|length > 0 %} depends=( {% for dep in pkg['deps'] %}'{{ dep }}' {% endfor %}){% endif %}{% if pkg['optdeps'] is defined and pkg['optdeps']|length > 0 %} optdepends=( {% for dep in pkg['optdeps'] %}'{{ dep }}' {% endfor %}){% endif %}{% if pkg['makedeps'] is defined and pkg['makedeps']|length > 0 %} makedepends=( {% for dep in pkg['makedeps'] %}'{{ dep }}' {% endfor %}){% endif %} diff --git a/_docs/PKGBUILD.templates.d.python/release/03.sources.j2 b/_docs/PKGBUILD.templates.d.python/release/03.sources.j2 index 6559f46..4435530 100644 --- a/_docs/PKGBUILD.templates.d.python/release/03.sources.j2 +++ b/_docs/PKGBUILD.templates.d.python/release/03.sources.j2 @@ -2,6 +2,6 @@ install= changelog= noextract=() source=("{{ pkg['srcurl'] }}" - "{{ pkg['srcfile'].sig }}") + "{{ pkg['srcfile'] }}.sig") sha512sums=('{{ pkg['srchash'] }}' 'SKIP') diff --git a/_docs/PKGBUILD.templates.d.python/srcinfo.j2 b/_docs/PKGBUILD.templates.d.python/srcinfo.j2 index a0a4ea0..e9293f9 100644 --- a/_docs/PKGBUILD.templates.d.python/srcinfo.j2 +++ b/_docs/PKGBUILD.templates.d.python/srcinfo.j2 @@ -6,17 +6,14 @@ pkgbase = {{ pkg['name'] }} pkgrel = 1 url = {{ pkg['site'] }} arch = i686 - arch = x86_64 -{% for license in pkg['license'] %} - license = {{ license }} -{% endfor %}{% if pkg['deps'] is defined and pkg['deps']|length > 0 %}{% for dep in pkg['deps'] %} + arch = x86_64{% for license in pkg['license'] %} + license = {{ license }}{% endfor %}{% if pkg['deps'] is defined and pkg['deps']|length > 0 %}{% for dep in pkg['deps'] %} depends = {{ dep }}{% endfor %}{% endif %}{% if pkg['optdeps'] is defined and pkg['optdeps']|length > 0 %}{% for dep in pkg['optdeps'] %} optdepends = {{ dep }}{% endfor %}{% endif %} source = {{ pkg['srcurl'] }}{% if pkg['srcfile'] is defined %} - source = {{ pkg['srcfile'] }}{% endif %} + source = {{ pkg['srcfile'] }}.sig{% endif %} sha512sums = {{ pkg['srchash'] }}{% if pkg['srcfile'] is defined%} sha512sums = SKIP{% endif %} pkgname = {{ pkg['name'] }} - diff --git a/_docs/PKGBUILD.templates.d.python/vcs/02.pkgmeta.j2 b/_docs/PKGBUILD.templates.d.python/vcs/02.pkgmeta.j2 index 74034de..a3019b9 100644 --- a/_docs/PKGBUILD.templates.d.python/vcs/02.pkgmeta.j2 +++ b/_docs/PKGBUILD.templates.d.python/vcs/02.pkgmeta.j2 @@ -4,7 +4,7 @@ pkgrel=1 pkgdesc="{{ pkg['desc'] }}" arch=( 'i686' 'x86_64' ) url="{{ pkg['site'] }}" -license=({% for license in pkg['license'] %}'{{ license }}' {% endfor %}){% if pkg['deps'] is defined and pkg['deps']|length > 0 %} +license=( {% for license in pkg['license'] %}'{{ license }}' {% endfor %}){% if pkg['deps'] is defined and pkg['deps']|length > 0 %} depends=( {% for dep in pkg['deps'] %}'{{ dep }}' {% endfor %}){% endif %}{% if pkg['optdeps'] is defined and pkg['optdeps']|length > 0 %} optdepends=( {% for dep in pkg['optdeps'] %}'{{ dep }}' {% endfor %}){% endif %}{% if pkg['makedeps'] is defined and pkg['makedeps']|length > 0 %} makedepends=( {% for dep in pkg['makedeps'] %}'{{ dep }}' {% endfor %}){% endif %} diff --git a/python-snakeoil b/python-snakeoil index e297e97..739223d 160000 --- a/python-snakeoil +++ b/python-snakeoil @@ -1 +1 @@ -Subproject commit e297e97c7a70149c4baa173940bbc3d166a035fc +Subproject commit 739223d5f59f6922d7532dccd56ee4e383d36d22