Files and packages renamed to battery-status-led

master
denes 6 years ago
parent 03511ab0d6
commit 644ac20e62

@ -32,8 +32,8 @@ DOCS="README.md"
src_install() { src_install() {
dodoc ${DOCS} dodoc ${DOCS}
dobin battery_status_led dobin battery-status-led
systemd_dounit battery_status_led.service systemd_dounit battery-status-led.service
} }
pkg_postinst() { pkg_postinst() {

@ -17,14 +17,14 @@
# with battery_status_led. If not, see # with battery_status_led. If not, see
# https://www.gnu.org/licenses/gpl-3.0.html. # https://www.gnu.org/licenses/gpl-3.0.html.
NAME="battery-status-led"
VERSION="0.1-1" VERSION="0.1-1"
rm -rf build*
mkdir -p build/batterystatusled_${VERSION}/DEBIAN rm -rf build*
# cp control build/batterystatusled_${VERSION}/DEBIAN/control mkdir -p build/${NAME}_${VERSION}/DEBIAN
cat > build/batterystatusled_${VERSION}/DEBIAN/control <<EOL cat > build/${NAME}_${VERSION}/DEBIAN/control <<EOL
Package: batterystatusled Package: ${NAME}
Version: ${VERSION} Version: ${VERSION}
Section: base Section: base
Priority: optional Priority: optional
@ -34,19 +34,19 @@ Description: Battery Status LED
Battery (low/critical) status indication by making a (the capslock) LED blink" Battery (low/critical) status indication by making a (the capslock) LED blink"
EOL EOL
mkdir -p build/batterystatusled_${VERSION}/lib/systemd/system mkdir -p build/${NAME}_${VERSION}/lib/systemd/system
cp ../battery_status_led.service build/batterystatusled_${VERSION}/lib/systemd/system/ cp ../${NAME}.service build/${NAME}_${VERSION}/lib/systemd/system/
mkdir -p build/batterystatusled_${VERSION}/usr/bin mkdir -p build/${NAME}_${VERSION}/usr/bin
cp ../battery_status_led build/batterystatusled_${VERSION}/usr/bin/ cp ../${NAME} build/${NAME}_${VERSION}/usr/bin/
mkdir -p build/batterystatusled_${VERSION}/usr/share/doc/batterystatusled mkdir -p build/${NAME}_${VERSION}/usr/share/doc/${NAME}
cp ../README.md build/batterystatusled_${VERSION}/usr/share/doc/batterystatusled/ cp ../README.md build/${NAME}_${VERSION}/usr/share/doc/${NAME}/
cd build cd build
dpkg-deb --root-owner-group --build batterystatusled_${VERSION} dpkg-deb --root-owner-group --build ${NAME}_${VERSION}
cd .. cd ..
mv build/batterystatusled_${VERSION}.deb . mv build/${NAME}_${VERSION}.deb .
rm -rf build rm -rf build

@ -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

Loading…
Cancel
Save