summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoost Bremmer2020-03-29 23:45:54 +0200
committerJoost Bremmer2020-03-29 23:45:54 +0200
commit0e5311ef8e76819264a693159369d8e9d07fae5b (patch)
treeed498e0e4a761cc0dbcdd75e4053b4b683ceb41d
parent06b1be356f374b5fee4f313d753883d97fea65f6 (diff)
downloadaur-0e5311ef8e76819264a693159369d8e9d07fae5b.tar.gz
Patch pages directory from /opt to /usr/share
Signed-off-by: Joost Bremmer <contact@madeofmagicandwires.online>
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD28
-rw-r--r--shortcut-c-client.patch60
3 files changed, 83 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ca4253f02de2..4deed33b288d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = shortcut-git
pkgdesc = A commandline client to list shortcuts
- pkgver = 0.1.0.r9.15af3dc
- pkgrel = 1
+ pkgver = 0.1.0
+ pkgrel = 2
url = https://github.com/mt-empty/shortcut-c-client
arch = x86_64
license = unknown
makedepends = git
- source = shortcut-c-client::git+https://github.com/mt-empty/shortcut-c-client.git
source = shortcut-pages::git+https://github.com/mt-empty/shortcut-pages.git
+ source = shortcut-c-client::git+https://github.com/mt-empty/shortcut-c-client.git
+ source = shortcut-c-client.patch
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = 3f0af6ac4ffff057a862d2f40a3aac1c83ef5f1a6ce4557275e7d101449f3888
pkgname = shortcut-pages-git
pkgdesc = A collections of keyboard shortcuts for Desktop application and websites
diff --git a/PKGBUILD b/PKGBUILD
index 03903e49de95..3e2279cc51ec 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,19 @@
# Maintainer Joost Bremmer <contact@madeofmagicandowires.online>
pkgbase=shortcut-git
pkgname=('shortcut-pages-git' 'shortcut-pages-extra-git' 'shortcut-c-client-git')
-pkgver=0.1.0.r9.15af3dc
-pkgrel=1
+pkgver=0.1.0
+pkgrel=2
pkgdesc="A commandline client to list shortcuts"
url="https://github.com/mt-empty/shortcut-c-client"
arch=('x86_64')
license=('unknown')
makedepends=('git')
-source=("shortcut-c-client::git+https://github.com/mt-empty/shortcut-c-client.git"
- "shortcut-pages::git+https://github.com/mt-empty/shortcut-pages.git")
-sha256sums=("SKIP"
- "SKIP")
+source=("shortcut-pages::git+https://github.com/mt-empty/shortcut-pages.git"
+ "shortcut-c-client::git+https://github.com/mt-empty/shortcut-c-client.git"
+ "shortcut-c-client.patch")
+sha256sums=('SKIP'
+ 'SKIP'
+ '40764c2baf725a7964f5d516fa4217a70aa384ceff74d74506341ce555cdb4b5')
pkgver() {
cd "${srcdir}/shortcut-pages"
@@ -20,6 +22,12 @@ pkgver() {
printf "0.1.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd "${srcdir}/shortcut-c-client"
+ patch -Np1 --input "${srcdir}/shortcut-c-client.patch"
+
+}
+
build() {
cd "${srcdir}/shortcut-c-client"
make shortcut
@@ -36,9 +44,9 @@ package_shortcut-pages-git() {
cd "$srcdir/shortcut-pages/GUI"
- install -dvm755 "${pkgdir}/opt/shortcut/pages"
+ install -dvm755 "${pkgdir}/usr/share/shortcut/pages"
find . -type f -iname "*.md" -exec \
- install -Dvm644 "{}" "${pkgdir}/opt/shortcut/pages/{}" \;
+ install -Dvm644 "{}" "${pkgdir}/usr/share/shortcut/pages/{}" \;
}
package_shortcut-pages-extra-git() {
@@ -51,9 +59,9 @@ package_shortcut-pages-extra-git() {
cd "$srcdir/shortcut-pages/nonGUI"
- install -dvm755 "${pkgdir}/opt/shortcut/pages"
+ install -dvm755 "${pkgdir}/usr/share/shortcut/pages"
find . -type f -iname "*.md" -not -regex "\.\/\(c\|git\|r\|unity\|\)\.md$" -exec \
- install -Dvm644 "{}" "${pkgdir}/opt/shortcut/pages/{}" \;
+ install -Dvm644 "{}" "${pkgdir}/usr/share/shortcut/pages/{}" \;
}
package_shortcut-c-client-git() {
diff --git a/shortcut-c-client.patch b/shortcut-c-client.patch
new file mode 100644
index 000000000000..8e2d2eacd5e7
--- /dev/null
+++ b/shortcut-c-client.patch
@@ -0,0 +1,60 @@
+Only in old: .git
+Only in old: .gitignore
+diff -aur old/makefile new/makefile
+--- old/makefile 2020-03-29 23:18:12.952101599 +0200
++++ new/makefile 2020-03-29 23:22:29.520194912 +0200
+@@ -3,8 +3,9 @@
+ DBGFLAG := -g
+ CCOBJFLAG := $(CCFLAG) -c
+
+-PREFIX = /usr/local
++PREFIX = /usr/
+ DESTDIR =
++DATADIR = /usr/share
+ TARGET = shortcut
+
+ REPO = https://github.com/mt-empty/shortcut-pages
+@@ -33,22 +34,22 @@
+
+ @echo "Installing"
+
+- @mkdir -p $(DESTDIR)/opt/$(TARGET)
+- @mv pages/ $(DESTDIR)/opt/$(TARGET)
+- @mv $< $(DESTDIR)/opt/$(TARGET)
+- @cp Readme.md $(DESTDIR)/opt/$(TARGET)
++ @mkdir -p $(DESTDIR)/$(DATADIR)/$(TARGET)
++ @mv pages/ $(DESTDIR)/$(DATADIR)/$(TARGET)
++ @mv $< $(DESTDIR)/$(DATADIR)/$(TARGET)
++ @cp Readme.md $(DESTDIR)/$(DATADIR)/$(TARGET)
+
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+- @ln -s $(DESTDIR)/opt/$(TARGET)/$(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
++ @ln -s $(DESTDIR)/$(DATADIR)/$(TARGET)/$(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
+ @echo "All done"
+
+ .PHONY: install-extra
+ install-extra: install
+- @cp -r shortcut-pages/nonGUI/* $(DESTDIR)/opt/$(TARGET)/pages/
++ @cp -r shortcut-pages/nonGUI/* $(DESTDIR)/$(DATADIR)/$(TARGET)/pages/
+
+
+ .PHONY: uninstall
+ uninstall:
+ @rm -rf $(DESTDIR)$(PREFIX)/bin/$(TARGET)
+- @rm -rf $(DESTDIR)/opt/$(TARGET)
+-# @echo "All done"
+\ No newline at end of file
++ @rm -rf $(DESTDIR)/$(DATADIR)/$(TARGET)
++# @echo "All done"
+diff -aur old/shortcut.c new/shortcut.c
+--- old/shortcut.c 2020-03-29 23:18:12.952101599 +0200
++++ new/shortcut.c 2020-03-29 23:23:52.270653011 +0200
+@@ -136,7 +136,7 @@
+ // prints shortcut page of a given program
+ int getShortcutPage(char *filename)
+ {
+- char path[50] = "/opt/shortcut/pages/";
++ char path[56] = "/usr/share/shortcut/pages/";
+ strcat(path, filename);
+ strcat(path, ".md");
+ // fprintf(stdout, "%s \n", path);