diff options
author | Daniel Bermond | 2021-02-12 23:12:10 +0000 |
---|---|---|
committer | Daniel Bermond | 2021-02-12 23:12:10 +0000 |
commit | 714067bfe70a6e296092e20fdb5372376f79e138 (patch) | |
tree | 39ff53114d9b0e35a478d1f9f06f5960f5e395b7 | |
download | aur-714067bfe70a6e296092e20fdb5372376f79e138.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | 010-diamond-editor-do-not-copy-cs-libs.patch | 20 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | diamond-editor.desktop | 11 | ||||
-rw-r--r-- | diamond-editor.sh | 3 |
5 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7cb4a944662c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = diamond-editor-git + pkgdesc = Compact text editor designed for programmers (git version) + pkgver = 1.3.6.r0.g1de106c + pkgrel = 1 + url = https://www.copperspice.com/ + arch = x86_64 + license = GPL2 + makedepends = git + makedepends = cmake + depends = sh + depends = copperspice + depends = hunspell + provides = diamond-editor + conflicts = diamond-editor + source = git+https://github.com/copperspice/diamond.git + source = 010-diamond-editor-do-not-copy-cs-libs.patch + source = diamond-editor.desktop + source = diamond-editor.sh + sha256sums = SKIP + sha256sums = 5b569f2bba090f5a32e93da38ee4ab225882a5567f7d1f60ffdeb2aae5469e6d + sha256sums = e114cad024aa5d6768bd50fabe51c311e37a4a7969382ace8c16878a06b824e4 + sha256sums = 16f8c39d44c7dfcf9784a6b0414af4aa266a67de10e17bffb6fd5ea43a95e48a + +pkgname = diamond-editor-git + diff --git a/010-diamond-editor-do-not-copy-cs-libs.patch b/010-diamond-editor-do-not-copy-cs-libs.patch new file mode 100644 index 000000000000..9e61490386d3 --- /dev/null +++ b/010-diamond-editor-do-not-copy-cs-libs.patch @@ -0,0 +1,20 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -216,17 +216,3 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + else() + install(TARGETS Diamond DESTINATION .) + endif() +- +-cs_copy_library(CsCore) +-cs_copy_library(CsGui) +-cs_copy_library(CsNetwork) +- +-if (CMAKE_SYSTEM_NAME MATCHES "Darwin") +- # copy required plugins to the bundle +- cs_copy_plugins(CsGui ../plugins) +- cs_copy_plugins(CsPrinterDriver ../plugins) +-else() +- # installs required plugins +- cs_copy_plugins(CsGui) +- cs_copy_plugins(CsPrinterDriver) +-endif() diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..138c9c029f14 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Daniel Bermond <dbermond@archlinux.org> + +pkgname=diamond-editor-git +pkgver=1.3.6.r0.g1de106c +pkgrel=1 +pkgdesc='Compact text editor designed for programmers (git version)' +arch=('x86_64') +url='https://www.copperspice.com/' +license=('GPL2') +depends=('sh' 'copperspice' 'hunspell') +makedepends=('git' 'cmake') +provides=('diamond-editor') +conflicts=('diamond-editor') +source=('git+https://github.com/copperspice/diamond.git' + '010-diamond-editor-do-not-copy-cs-libs.patch' + 'diamond-editor.desktop' + 'diamond-editor.sh') +sha256sums=('SKIP' + '5b569f2bba090f5a32e93da38ee4ab225882a5567f7d1f60ffdeb2aae5469e6d' + 'e114cad024aa5d6768bd50fabe51c311e37a4a7969382ace8c16878a06b824e4' + '16f8c39d44c7dfcf9784a6b0414af4aa266a67de10e17bffb6fd5ea43a95e48a') + +prepare() { + patch -d diamond -Np1 -i "${srcdir}/010-diamond-editor-do-not-copy-cs-libs.patch" +} + +pkgver() { + git -C diamond describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^diamond\.//' +} + +build() { + cmake -B build -S diamond \ + -DCMAKE_BUILD_TYPE:STRING='None' \ + -DCMAKE_INSTALL_PREFIX:PATH='/opt/diamond-editor' \ + -Wno-dev + make -C build +} + +package() { + make -C build DESTDIR="$pkgdir" install + mkdir -p "$pkgdir"{/opt/diamond-editor/{platforms,printerdrivers},/usr/share/pixmaps} + install -D -m755 diamond-editor.sh "${pkgdir}/usr/bin/diamond-editor" + install -D -m644 diamond-editor.desktop -t "${pkgdir}/usr/share/applications" + ln -s ../../../opt/diamond-editor/diamond.png "${pkgdir}/usr/share/pixmaps/diamond-editor.png" + + local _dir + local _file + while read -r -d '' _file + do + if [[ "${_file##*/}" =~ ^CsGui.*\.so$ ]] + then + _dir='platforms' + else + _dir='printerdrivers' + fi + ln -s "../../../usr/lib/${_file##*/}" "${pkgdir}/opt/diamond-editor/${_dir}/${_file##*/}" + done < <(find -L /usr/lib -type f -regextype posix-extended -regex '.*/Cs(Gui|PrinterDriver).*\.so$' -print0) +} diff --git a/diamond-editor.desktop b/diamond-editor.desktop new file mode 100644 index 000000000000..689f1d27a89f --- /dev/null +++ b/diamond-editor.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=Diamond +Comment=Compact editor designed for programmers +Path=/usr/bin +Exec=diamond-editor +Icon=diamond-editor +Terminal=false +StartupNotify=false +Type=Application +Categories=Application;Utility;TextEditor;WordProcessor; diff --git a/diamond-editor.sh b/diamond-editor.sh new file mode 100644 index 000000000000..d7c357c27393 --- /dev/null +++ b/diamond-editor.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /opt/diamond-editor/diamond "$@" |