summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Yang2016-07-16 21:13:51 +0800
committerMichael Yang2016-07-16 21:13:51 +0800
commit8141fc7c710e33780f0d2a2e130886ec3efedff0 (patch)
tree6bdea1623627f1fb660ffce1901f4f11bdd8952a
downloadaur-8141fc7c710e33780f0d2a2e130886ec3efedff0.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rwxr-xr-xPKGBUILD47
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3b28340723e1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by mksrcinfo v8
+# Sat Jul 16 13:12:53 UTC 2016
+pkgbase = qmlfmt-git
+ pkgdesc = Command line application that formats QML files
+ pkgver = 0.1.0.r7.58bf170
+ pkgrel = 1
+ url = https://github.com/jesperhh/qmlfmt
+ arch = i686
+ arch = x86_64
+ license = unknown
+ makedepends = git
+ makedepends = cmake>=3.0
+ makedepends = qt5-script
+ makedepends = qt5-declarative
+ depends = qt5-base
+ provides = qmlfmt
+ conflicts = qmlfmt
+ source = git://github.com/jesperhh/qmlfmt.git
+ sha512sums = SKIP
+
+pkgname = qmlfmt-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..6438a28dd1f4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Michael Yang <ohmyarchlinux@gmail.com>
+
+pkgname=qmlfmt-git
+pkgver=0.1.0.r7.58bf170
+pkgrel=1
+pkgdesc="Command line application that formats QML files"
+arch=('i686' 'x86_64')
+url="https://github.com/jesperhh/qmlfmt"
+license=('unknown')
+depends=('qt5-base')
+makedepends=('git' 'cmake>=3.0' 'qt5-script' 'qt5-declarative')
+conflicts=('qmlfmt')
+provides=('qmlfmt')
+source=("git://github.com/jesperhh/qmlfmt.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd qmlfmt
+ echo "0.1.0.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ mkdir -p build
+}
+
+build() {
+ sed qmlfmt/QtCreator/QtCreator.cmake -i \
+ -e 's/http/https/' \
+ -e 's/3.3/4.0/' \
+ -e 's/3.3.0/4.0.3/g' \
+ -e 's/$<CONFIG>/RELEASE/g' \
+ -e '8aPATCH_COMMAND sed -i -e "s# QTC_REL_TOOLS_PATH##" src/libs/utils/consoleprocess_unix.cpp'
+ sed qmlfmt/QtCreator/CMakeLists.txt -i \
+ -e '14afind_package(Qt5Qml REQUIRED)' \
+ -e 's/:Concurrent/:Concurrent Qt5::Qml/'
+ sed -i '11a#include <qmljs/parser/qmljsengine_p.h>' qmlfmt/qmlfmt.cpp
+ cd build
+ cmake ../qmlfmt \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ mkdir -p ${pkgdir}/usr/bin
+ cp build/qmlfmt ${pkgdir}/usr/bin
+}