|
|
@ -2,37 +2,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
# Copyright 2018 Denes Matetelki
|
|
|
|
# Copyright 2018 Denes Matetelki
|
|
|
|
|
|
|
|
|
|
|
|
# This file is part of battery_status_led.
|
|
|
|
# This file is part of ${NAME}.
|
|
|
|
|
|
|
|
|
|
|
|
# battery_status_led is free software: you can redistribute it and/or modify it
|
|
|
|
# ${NAME} is free software: you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License v3 as published by the Free
|
|
|
|
# under the terms of the GNU General Public License v3 as published by the Free
|
|
|
|
# Software Foundation.
|
|
|
|
# Software Foundation.
|
|
|
|
|
|
|
|
|
|
|
|
# battery_status_led is distributed in the hope that it will be useful, but
|
|
|
|
# ${NAME} is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License v3 for
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License v3 for
|
|
|
|
# more details.
|
|
|
|
# more details.
|
|
|
|
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License v3 along
|
|
|
|
# You should have received a copy of the GNU General Public License v3 along
|
|
|
|
# with battery_status_led. If not, see
|
|
|
|
# with ${NAME}. If not, see
|
|
|
|
# https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
# https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
|
|
|
|
|
|
|
|
VERSION="0.1-1"
|
|
|
|
NAME="battery-status-led"
|
|
|
|
|
|
|
|
VERSION="0.1"
|
|
|
|
|
|
|
|
RELEASE="1"
|
|
|
|
|
|
|
|
|
|
|
|
rm -rf build*
|
|
|
|
rm -rf build*
|
|
|
|
mkdir build
|
|
|
|
mkdir build
|
|
|
|
|
|
|
|
|
|
|
|
cat > build/battery_status_led.spec <<EOL
|
|
|
|
cat > build/${NAME}.spec <<EOL
|
|
|
|
Name: battery_status_led
|
|
|
|
Name: ${NAME}
|
|
|
|
Version: 0.1
|
|
|
|
Version: ${VERSION}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Release: ${RELEASE}%{?dist}
|
|
|
|
Summary: Battery status indication on an LED
|
|
|
|
Summary: Battery status indication on an LED
|
|
|
|
|
|
|
|
|
|
|
|
Group: Utilities
|
|
|
|
Group: Utilities
|
|
|
|
License: GPLv3
|
|
|
|
License: GPLv3
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
Source0: battery_status_led.service
|
|
|
|
Source0: ${NAME}.service
|
|
|
|
Source1: battery_status_led
|
|
|
|
Source1: ${NAME}
|
|
|
|
Source2: README.md
|
|
|
|
Source2: README.md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -46,26 +49,26 @@ mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
install -p -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}
|
|
|
|
install -p -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}
|
|
|
|
mkdir -p %{buildroot}/%{_bindir}
|
|
|
|
mkdir -p %{buildroot}/%{_bindir}
|
|
|
|
install -p -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
|
|
|
|
install -p -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
|
|
|
|
mkdir -p %{buildroot}/%{_docdir}/%{name}
|
|
|
|
mkdir -p %{buildroot}/%{_docdir}/${NAME}
|
|
|
|
install -p -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/README.md
|
|
|
|
install -p -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/${NAME}/
|
|
|
|
|
|
|
|
|
|
|
|
# %clean
|
|
|
|
# %clean
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_unitdir}/battery_status_led.service
|
|
|
|
%{_unitdir}/${NAME}.service
|
|
|
|
%{_bindir}/battery_status_led
|
|
|
|
%{_bindir}/${NAME}
|
|
|
|
%{_docdir}/%{name}/README.md
|
|
|
|
%{_docdir}/${NAME}/README.md
|
|
|
|
|
|
|
|
|
|
|
|
# %changelog
|
|
|
|
# %changelog
|
|
|
|
EOL
|
|
|
|
EOL
|
|
|
|
|
|
|
|
|
|
|
|
cp ../battery_status_led.service build/
|
|
|
|
cp ../${NAME}.service build/
|
|
|
|
cp ../battery_status_led build/
|
|
|
|
cp ../${NAME} build/
|
|
|
|
cp ../README.md build/
|
|
|
|
cp ../README.md build/
|
|
|
|
|
|
|
|
|
|
|
|
cd build
|
|
|
|
cd build
|
|
|
|
rpmbuild --define "_sourcedir $PWD" --define "_rpmdir $PWD" --define "_unitdir /lib/systemd/system" -bb battery_status_led.spec
|
|
|
|
rpmbuild --define "_sourcedir $PWD" --define "_rpmdir $PWD" --define "_unitdir /lib/systemd/system" -bb ${NAME}.spec
|
|
|
|
cd ..
|
|
|
|
cd ..
|
|
|
|
mv build/noarch/battery_status_led-${VERSION}.noarch.rpm .
|
|
|
|
mv build/noarch/${NAME}-${VERSION}-${RELEASE}.noarch.rpm .
|
|
|
|
rm -rf build
|
|
|
|
rm -rf build
|
|
|
|