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() {
dodoc ${DOCS}
dobin battery_status_led
systemd_dounit battery_status_led.service
dobin battery-status-led
systemd_dounit battery-status-led.service
}
pkg_postinst() {

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

@ -2,37 +2,40 @@
# 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
# 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
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License v3 for
# more details.
# 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.
VERSION="0.1-1"
NAME="battery-status-led"
VERSION="0.1"
RELEASE="1"
rm -rf build*
mkdir build
cat > build/battery_status_led.spec <<EOL
Name: battery_status_led
Version: 0.1
Release: 1%{?dist}
cat > build/${NAME}.spec <<EOL
Name: ${NAME}
Version: ${VERSION}
Release: ${RELEASE}%{?dist}
Summary: Battery status indication on an LED
Group: Utilities
License: GPLv3
BuildArch: noarch
Source0: battery_status_led.service
Source1: battery_status_led
Source0: ${NAME}.service
Source1: ${NAME}
Source2: README.md
@ -46,26 +49,26 @@ mkdir -p %{buildroot}%{_unitdir}
install -p -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}/%{_bindir}
install -p -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_docdir}/%{name}
install -p -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/README.md
mkdir -p %{buildroot}/%{_docdir}/${NAME}
install -p -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/${NAME}/
# %clean
%files
%defattr(-,root,root,-)
%{_unitdir}/battery_status_led.service
%{_bindir}/battery_status_led
%{_docdir}/%{name}/README.md
%{_unitdir}/${NAME}.service
%{_bindir}/${NAME}
%{_docdir}/${NAME}/README.md
# %changelog
EOL
cp ../battery_status_led.service build/
cp ../battery_status_led build/
cp ../${NAME}.service build/
cp ../${NAME} build/
cp ../README.md 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 ..
mv build/noarch/battery_status_led-${VERSION}.noarch.rpm .
mv build/noarch/${NAME}-${VERSION}-${RELEASE}.noarch.rpm .
rm -rf build

Loading…
Cancel
Save