diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | pagure-sqlite.install | 19 |
4 files changed, 55 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = pagure pkgdesc = A git-centered forge based on python using pygit2 pkgver = 5.8.1 - pkgrel = 0.16 + pkgrel = 0.17 url = https://pagure.io/pagure arch = any license = GPL2 @@ -58,6 +58,16 @@ pkgname = pagure-apache depends = apache backup = etc/httpd/conf/extra/pagure.conf +pkgname = pagure-mariadb + pkgdesc = A git-centered forge based on python using pygit2 (MariaDB backend configuration) + install = pagure-mariadb.install + depends = pagure=5.8.1 + depends = mariadb + depends = python-mysqlclient + provides = pagure-backend + conflicts = pagure-postgresql + conflicts = pagure-sqlite + pkgname = pagure-postgresql pkgdesc = A git-centered forge based on python using pygit2 (PostgreSQL backend configuration) install = pagure-postgresql.install @@ -66,13 +76,14 @@ pkgname = pagure-postgresql depends = python-psycopg2 provides = pagure-backend conflicts = pagure-mariadb + conflicts = pagure-sqlite -pkgname = pagure-mariadb - pkgdesc = A git-centered forge based on python using pygit2 (MariaDB backend configuration) - install = pagure-mariadb.install +pkgname = pagure-sqlite + pkgdesc = A git-centered forge based on python using pygit2 (SQLite backend configuration) + install = pagure-sqlite.install depends = pagure=5.8.1 - depends = mariadb - depends = python-mysqlclient + depends = sqlite provides = pagure-backend + conflicts = pagure-mariadb conflicts = pagure-postgresql diff --git a/.gitignore b/.gitignore index 1604f0809593..58580234582d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ !./PKGBUILD !./pagure-mariadb.install !./pagure-postgresql.install +!./pagure-sqlite.install @@ -5,9 +5,9 @@ # Mageia spec: http://svnweb.mageia.org/packages/cauldron/pagure/current/SPECS/pagure.spec?view=markup pkgbase=pagure -pkgname=("$pkgbase" "$pkgbase-apache" "$pkgbase-postgresql" "$pkgbase-mariadb") +pkgname=("$pkgbase" "$pkgbase-apache" "$pkgbase-mariadb" "$pkgbase-postgresql" "$pkgbase-sqlite") pkgver=5.8.1 -pkgrel=0.16 +pkgrel=0.17 pkgdesc="A git-centered forge based on python using pygit2" arch=("any") url="https://pagure.io/$pkgbase" @@ -94,22 +94,32 @@ package_pagure-apache() { install -Dm644 -t "$pkgdir/etc/httpd/conf/extra/" files/pagure.conf } +package_pagure-mariadb() { + pkgdesc+=" (MariaDB backend configuration)" + depends=("$pkgbase=$pkgver" 'mariadb' 'python-mysqlclient') # alternative: python-pymysql + provides=("$pkgbase-backend") + conflicts=("$pkgbase-postgresql" "$pkgbase-sqlite") + install="$pkgbase-mariadb.install" + cd "$pkgbase-$pkgver" + install -Dm644 -t "$pkgdir/usr/share/$pkgbase/" createdb.py +} + package_pagure-postgresql() { pkgdesc+=" (PostgreSQL backend configuration)" depends=("$pkgbase=$pkgver" 'postgresql' 'python-psycopg2') # alternative: python-pg8000 provides=("$pkgbase-backend") - conflicts=("$pkgbase-mariadb") + conflicts=("$pkgbase-mariadb" "$pkgbase-sqlite") install="$pkgbase-postgresql.install" cd "$pkgbase-$pkgver" install -Dm644 -t "$pkgdir/usr/share/$pkgbase/" createdb.py } -package_pagure-mariadb() { - pkgdesc+=" (MariaDB backend configuration)" - depends=("$pkgbase=$pkgver" 'mariadb' 'python-mysqlclient') # alternative: python-pymysql +package_pagure-sqlite() { + pkgdesc+=" (SQLite backend configuration)" + depends=("$pkgbase=$pkgver" 'sqlite') provides=("$pkgbase-backend") - conflicts=("$pkgbase-postgresql") - install="$pkgbase-mariadb.install" + conflicts=("$pkgbase-mariadb" "$pkgbase-postgresql") + install="$pkgbase-sqlite.install" cd "$pkgbase-$pkgver" install -Dm644 -t "$pkgdir/usr/share/$pkgbase/" createdb.py } diff --git a/pagure-sqlite.install b/pagure-sqlite.install new file mode 100644 index 000000000000..612a3b66c13e --- /dev/null +++ b/pagure-sqlite.install @@ -0,0 +1,19 @@ +post_install() { + cat <<- EOF + Te setup using SQLite use: + + Configure Pagure in /etc/pagure/pagure.cfg and /etc/pagure/alembic.ini + + \$ python /usr/share/pagure/createdb.py --initial -c /etc/pagure/pagure.cfg -i /etc/pagure/alembic.ini + EOF +} + +post_upgrade() { + cat <<- EOF + Update Pagure database format using: + + \$ python /usr/share/pagure/createdb.py -c /etc/pagure/pagure.cfg + EOF +} + +# vim : ts=4 sw=4 noet |