summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMayorBender2019-06-18 21:05:03 -0400
committerMayorBender2019-06-18 21:10:48 -0400
commitcc401127e208ae058077fbf3e7fe7eac9c7f5c29 (patch)
tree2a18ad0c99b0161eaac3c0284f6a88485b3b484e
parentf3154ab496cc8439a5d8bdf2b8dffadd96672be7 (diff)
downloadaur-cc401127e208ae058077fbf3e7fe7eac9c7f5c29.tar.gz
style50 v2.6.4 - Upstream uses Python (PyPI) now instead of Java.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD38
-rw-r--r--style502
3 files changed, 34 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a1815ef93859..df0703f05480 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,16 @@
pkgbase = style50
- pkgdesc = Style check tool for CS50 / CS50x (Harvard College's Introduction to Computer Science I)
- pkgver = 2.1.4
+ pkgdesc = This is style50, with which code can be checked against the CS50 style guide
+ pkgver = 2.6.4
pkgrel = 1
- url = https://manual.cs50.net/style/
+ url = https://github.com/cs50/style50
arch = any
- license = CCPL
- depends = java-runtime
- source = http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/style50_2.1.4-1_i386.deb
- source = style50
- md5sums = cc705554b5a1a51951a19fa1696ed2e6
- md5sums = 1faa45e25def1e194cf8c1e365c03e73
+ license = GPL
+ makedepends = python-setuptools
+ depends = python
+ optdepends = astyle: To style check C, C++, or Java code
+ source = https://files.pythonhosted.org/packages/source/s/style50/style50-2.6.4.tar.gz
+ sha256sums = f97c7c46669030ff3da99bf17339b05f957469251ab92e34281cbd24753f22f0
pkgname = style50
+ depends = python
diff --git a/PKGBUILD b/PKGBUILD
index 1a01758a54be..0d8f32a4d9fd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,32 @@
-# Maintainer: Peter Lamby <peterlamby@web.de>
+# Generated using pip2pkgbuild - https://github.com/wenLiangcan/pip2pkgbuild
+# Maintainer: MayorBender <7480812+kingy9000@users.noreply.github.com>
+# Contributor: Peter Lamby <peterlamby@web.de>
+
pkgname=style50
-pkgver=2.1.4
+_module='style50' # PyPi specific
+pkgver=2.6.4
pkgrel=1
-pkgdesc="Style check tool for CS50 / CS50x (Harvard College's Introduction to Computer Science I)"
+pkgdesc="This is style50, with which code can be checked against the CS50 style guide"
arch=('any')
-url="https://manual.cs50.net/style/"
-license=('CCPL')
-source=("http://mirror.cs50.net/appliance50/2015/debs/dists/trusty/main/binary-i386/style50_2.1.4-1_i386.deb"
- "style50")
-depends=('java-runtime')
-md5sums=('cc705554b5a1a51951a19fa1696ed2e6'
- '1faa45e25def1e194cf8c1e365c03e73')
+url="https://github.com/cs50/style50"
+license=('GPL')
+depends=('python')
+makedepends=('python-setuptools')
+optdepends=('astyle: To style check C, C++, or Java code')
+source=(
+ "https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz"
+)
+sha256sums=(
+ '8bb68f0be72660411976ab1742c759845f981eefe0f21edb1533882a1833c8a0'
+)
-prepare() {
- ar p style50_"$pkgver"-"$pkgrel"_i386.deb data.tar.xz | unxz | tar -x -C "$srcdir"
+build() {
+ cd "${srcdir}/${_module}-${pkgver}"
+ python setup.py build
}
package() {
- install -Dm755 "$srcdir"/style50 "$pkgdir"/usr/bin/style50
- install -Dm655 "$srcdir"/opt/style50/opt/style50.jar "$pkgdir"/opt/style50/style50.jar
+ depends+=()
+ cd "${srcdir}/${_module}-${pkgver}"
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}
diff --git a/style50 b/style50
deleted file mode 100644
index d7766f82d984..000000000000
--- a/style50
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-java -jar /opt/style50/style50.jar "$@"