-
Notifications
You must be signed in to change notification settings - Fork 6
/
build-rpm.sh
executable file
·29 lines (22 loc) · 1.52 KB
/
build-rpm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# This script builds an RPM package for Luminance
echo "Building the app..."
./build.sh
echo "Creating 'build/rpm-package-files' directory..."
if [ -d "build/rpm-package-files" ]; then
rm -rf ./build/rpm-package-files
fi
mkdir -p ./build/rpm-package-files/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo "Copying files to the package structure..."
cp ./build/app ./build/rpm-package-files/rpmbuild/SOURCES/com.sidevesh.Luminance
cp ./rpm/com.sidevesh.Luminance.spec ./build/rpm-package-files/rpmbuild/SPECS/com.sidevesh.Luminance.spec
cp ./install_files/com.sidevesh.Luminance.desktop ./build/rpm-package-files/rpmbuild/SOURCES/com.sidevesh.Luminance.desktop
cp ./install_files/com.sidevesh.Luminance.gschema.xml ./build/rpm-package-files/rpmbuild/SOURCES/com.sidevesh.Luminance.gschema.xml
cp ./install_files/44-backlight-permissions.rules ./build/rpm-package-files/rpmbuild/SOURCES/44-backlight-permissions.rules
cp ./icons/hicolor/scalable/apps/com.sidevesh.Luminance.svg ./build/rpm-package-files/rpmbuild/SOURCES/com.sidevesh.Luminance.svg
cp ./icons/hicolor/symbolic/apps/com.sidevesh.Luminance-symbolic.svg ./build/rpm-package-files/rpmbuild/SOURCES/com.sidevesh.Luminance-symbolic.svg
echo "Creating RPM package..."
rpmbuild --define "_topdir `pwd`/build/rpm-package-files/rpmbuild" -bb ./build/rpm-package-files/rpmbuild/SPECS/com.sidevesh.Luminance.spec
echo "Moving the RPM package to the root build directory..."
cp ./build/rpm-package-files/rpmbuild/RPMS/*/*.rpm ./build/luminance.rpm
echo "RPM package built successfully"