summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorymber2019-08-28 10:43:24 +0100
committerymber2019-08-28 10:45:15 +0100
commitcf54a6cda5b647305c9e9837e6b3dfe312a4de84 (patch)
tree695f97aed931fb3ab57ef2412e59139869a43aa0
parent853201a6d074618510465408d49e62e71b6cd50f (diff)
downloadaur-cf54a6cda5b647305c9e9837e6b3dfe312a4de84.tar.gz
Patch source files properly
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD16
-rw-r--r--config.h12
-rw-r--r--slock-nobody-1.4.diff12
-rw-r--r--slock-solarized-dark-1.4.diff (renamed from solarized.patch)15
-rw-r--r--slock-yutna-1.4.diff10
6 files changed, 44 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index afa957e182a2..66084ef4f923 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,11 +8,13 @@ pkgbase = slock-solarized-dark
depends = libxrandr
provides = slock
source = https://dl.suckless.org/tools/slock-1.4.tar.gz
- source = config.h
- source = solarized.patch
+ source = slock-nobody-1.4.diff
+ source = slock-solarized-dark-1.4.diff
+ source = slock-yutna-1.4.diff
sha256sums = b53849dbc60109a987d7a49b8da197305c29307fd74c12dc18af0d3044392e6a
- sha256sums = fd86100f2dd81fc41a4b4cb2a54a6076d393b08ab43d98b5e5ba7bbf1218fe71
- sha256sums = 1d9b1dad24cd6bf51f7ce39b855634dcbb301ae22f79ddcf44fa09fad8dc4e79
+ sha256sums = ca2229fdbded92150a7050c59c5237d2c52e77cd4c36050ffc5fa31600ab9d41
+ sha256sums = 0c668deac297a395cf6211b8940818b0d9ffd46ff6cf101a883b244cebf32d72
+ sha256sums = baf1766a7a09d13601ec5d625415d1d3e5ce183f9d1b6b0b8c27298f26308bae
pkgname = slock-solarized-dark
diff --git a/PKGBUILD b/PKGBUILD
index 764580fc5af7..634a6fd2fb3a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,16 +11,19 @@ license=("MIT")
depends=("libxrandr")
provides=("slock")
source=(https://dl.suckless.org/tools/$_pkgname-$pkgver.tar.gz
- config.h
- solarized.patch)
+ slock-nobody-$pkgver.diff
+ slock-solarized-dark-$pkgver.diff
+ slock-yutna-$pkgver.diff)
sha256sums=("b53849dbc60109a987d7a49b8da197305c29307fd74c12dc18af0d3044392e6a"
- "fd86100f2dd81fc41a4b4cb2a54a6076d393b08ab43d98b5e5ba7bbf1218fe71"
- "1d9b1dad24cd6bf51f7ce39b855634dcbb301ae22f79ddcf44fa09fad8dc4e79")
+ "ca2229fdbded92150a7050c59c5237d2c52e77cd4c36050ffc5fa31600ab9d41"
+ "0c668deac297a395cf6211b8940818b0d9ffd46ff6cf101a883b244cebf32d72"
+ "baf1766a7a09d13601ec5d625415d1d3e5ce183f9d1b6b0b8c27298f26308bae")
prepare() {
cd $srcdir/$_pkgname-$pkgver
- cp $srcdir/config.h config.h
- patch -p0 -i $srcdir/solarized.patch
+ patch -p1 -i $srcdir/slock-nobody-$pkgver.diff
+ patch -p1 -i $srcdir/slock-solarized-dark-$pkgver.diff
+ patch -p1 -i $srcdir/slock-yutna-$pkgver.diff
}
build() {
@@ -34,4 +37,3 @@ package() {
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$_pkgname/LICENSE
install -Dm644 README $pkgdir/usr/share/doc/$_pkgname/README
}
-
diff --git a/config.h b/config.h
deleted file mode 100644
index 9855e2117e71..000000000000
--- a/config.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* user and group to drop privileges to */
-static const char *user = "nobody";
-static const char *group = "nogroup";
-
-static const char *colorname[NUMCOLS] = {
- [INIT] = "black", /* after initialization */
- [INPUT] = "#005577", /* during input */
- [FAILED] = "#CC3333", /* wrong password */
-};
-
-/* treat a cleared input like a wrong password (color) */
-static const int failonclear = 1;
diff --git a/slock-nobody-1.4.diff b/slock-nobody-1.4.diff
new file mode 100644
index 000000000000..323021e6ca13
--- /dev/null
+++ b/slock-nobody-1.4.diff
@@ -0,0 +1,12 @@
+diff --git a/config.def.h b/config.def.h
+index 9855e21..27cc2d0 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -1,6 +1,6 @@
+ /* user and group to drop privileges to */
+ static const char *user = "nobody";
+-static const char *group = "nogroup";
++static const char *group = "nobody";
+
+ static const char *colorname[NUMCOLS] = {
+ [INIT] = "black", /* after initialization */
diff --git a/solarized.patch b/slock-solarized-dark-1.4.diff
index 508b277bcf04..89e1f027acb5 100644
--- a/solarized.patch
+++ b/slock-solarized-dark-1.4.diff
@@ -1,16 +1,15 @@
---- config.def.h 2016-11-20 00:31:23.000000000 +0000
-+++ config.h 2018-11-24 12:02:40.238994112 +0000
-@@ -1,11 +1,11 @@
- /* user and group to drop privileges to */
- static const char *user = "nobody";
--static const char *group = "nogroup";
-+static const char *group = "nobody";
+diff --git a/config.def.h b/config.def.h
+index 9855e21..aeafb89 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -3,9 +3,9 @@ static const char *user = "nobody";
+ static const char *group = "nogroup";
static const char *colorname[NUMCOLS] = {
- [INIT] = "black", /* after initialization */
- [INPUT] = "#005577", /* during input */
- [FAILED] = "#CC3333", /* wrong password */
-+ [INIT] = "#002b36", /* after initialization */
++ [INIT] = "#002b36", /* after initialization */
+ [INPUT] = "#268bd2", /* during input */
+ [FAILED] = "#cb4b16", /* wrong password */
};
diff --git a/slock-yutna-1.4.diff b/slock-yutna-1.4.diff
new file mode 100644
index 000000000000..fc1d2f3584c1
--- /dev/null
+++ b/slock-yutna-1.4.diff
@@ -0,0 +1,10 @@
+diff --git a/config.def.h b/config.def.h
+index 9855e21..92ef6dc 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -9,4 +9,4 @@ static const char *colorname[NUMCOLS] = {
+ };
+
+ /* treat a cleared input like a wrong password (color) */
+-static const int failonclear = 1;
++static const int failonclear = 0;