From 92e861dc0d455e4f191c2299722239dac7448e0c Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Nov 28 2016 15:44:08 +0000 Subject: Initial upload --- diff --git a/.gitignore b/.gitignore index e69de29..3213366 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/brightnessctl-0.1.1_p2.tar.gz diff --git a/brightnessctl.spec b/brightnessctl.spec new file mode 100644 index 0000000..e668765 --- /dev/null +++ b/brightnessctl.spec @@ -0,0 +1,39 @@ +Name: brightnessctl +Version: 0.1.1_p2 +Release: 2%{?dist} +Summary: Read and control device brightness + +License: MIT +URL: https://github.com/Hummer12007/%{name} +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/Hummer12007/brightnessctl/pull/2 +Patch0: brightnessctl_0.1.1_fix-makefile.patch + +BuildRequires: gcc +BuildRequires: make + +%description +Utility to read and control the display brightness. + +%prep +%autosetup + +%build +export CFLAGS="%{optflags}" +export LDFLAGS="%{__global_ldflags}" +%make_build + +%install +%make_install DESTDIR=%{buildroot}%{_prefix} + +%files +%doc README +%license LICENSE +%{_bindir}/%{name} + +%changelog +* Sun Nov 27 2016 Fabio Alessandro Locati - 0.1.1_p2-2 +- Improvements thanks to Igor review + +* Sun Nov 27 2016 Fabio Alessandro Locati - 0.1.1_p2-1 +- Initial packaging diff --git a/brightnessctl_0.1.1_fix-makefile.patch b/brightnessctl_0.1.1_fix-makefile.patch new file mode 100644 index 0000000..206071f --- /dev/null +++ b/brightnessctl_0.1.1_fix-makefile.patch @@ -0,0 +1,20 @@ +--- /tmp/brightnessctl.old/Makefile 2016-11-27 15:53:43.798492921 +0000 ++++ /tmp/brightnessctl/Makefile 2016-11-27 16:36:22.599309821 +0000 +@@ -1,11 +1,13 @@ +-all: brightnessctl +-VERSION=0.1.1 ++VERSION = 0.1.1 + DESTDIR ?= /usr/local +-CFLAGS=-ggdb -Wall -Wextra -DVERSION=\"${VERSION}\" -D_GNU_SOURCE ++CFLAGS += -ggdb -Wall -Wextra -DVERSION=\"${VERSION}\" -D_GNU_SOURCE ++LDFLAGS ?= ++ ++all: brightnessctl + + install: brightnessctl + install -d ${DESTDIR}/bin +- install -m 4711 brightnessctl ${DESTDIR}/bin/ ++ install -m 4755 -p brightnessctl ${DESTDIR}/bin/ + + clean: + rm -f brightnessctl diff --git a/sources b/sources index e69de29..4dc610e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ab97278626a74069cea24df89639b3ea brightnessctl-0.1.1_p2.tar.gz