summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD41
-rw-r--r--notepadqq.install32
3 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b462d7d65a57
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = notepadqq-git
+ pkgdesc = A Linux clone of Notepad++
+ pkgver = 0.46.0.r1.g54c9d6f
+ pkgrel = 1
+ url = http://notepadqq.altervista.org/wp/
+ install = notepadqq.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = qt5-svg
+ depends = qt5-webkit
+ depends = hicolor-icon-theme
+ depends = desktop-file-utils
+ provides = notepadqq
+ conflicts = notepadqq-bin
+ conflicts = notepadqq
+ conflicts = notepadqq-common
+ options = !emptydirs
+ source = git+https://github.com/notepadqq/notepadqq.git
+ sha1sums = SKIP
+
+pkgname = notepadqq-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..209a1d87b93d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Jesse Spangenberger <azulephoenix@gmail.com>
+
+pkgname=notepadqq-git
+_pkgname=notepadqq
+pkgver=0.46.0.r1.g54c9d6f
+pkgrel=1
+pkgdesc="A Linux clone of Notepad++"
+arch=('i686' 'x86_64')
+url="http://notepadqq.altervista.org/wp/"
+license=('GPL3')
+depends=('qt5-webkit' 'hicolor-icon-theme' 'desktop-file-utils')
+makedepends=('git' 'qt5-svg')
+provides=('notepadqq')
+conflicts=('notepadqq-bin' 'notepadqq' 'notepadqq-common')
+install=${_pkgname}.install
+sha1sums=('SKIP')
+options=('!emptydirs')
+
+source=(git+https://github.com/notepadqq/notepadqq.git)
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ set -o pipefail
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+
+ ./configure --qmake-path qmake-qt5 --prefix "${pkgdir}/usr"
+ make
+
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}/src/ui"
+ make DESTDIR="${pkgdir}/usr" install
+
+ install -Dm644 "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_pkgname}.svg" "${pkgdir}/usr/share/pixmaps/${_pkgname}.svg"
+}
diff --git a/notepadqq.install b/notepadqq.install
new file mode 100644
index 000000000000..bb6fd24234ab
--- /dev/null
+++ b/notepadqq.install
@@ -0,0 +1,32 @@
+# Colored makepkg-like functions
+msg_blue() {
+ printf "${BLUE}==>${ALL_OFF}${BOLD} $1${ALL_OFF}\n"
+}
+
+note() {
+ printf "${BLUE}==>${ALL_OFF}${YELLOW} NOTE:${ALL_OFF}${BOLD} $1${ALL_OFF}\n"
+}
+
+ALL_OFF="$(tput sgr0)"
+BOLD="$(tput bold)"
+BLUE="${BOLD}$(tput setaf 4)"
+YELLOW="${BOLD}$(tput setaf 3)"
+
+_update() {
+ msg_blue "Updating desktop MIME database..."
+ update-desktop-database -q
+ msg_blue "Updating icon cache.."
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+post_install() {
+ _update
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ _update
+}