Files
fedora-tools/scripts/build-plasma-task-group-shortcuts-rpm
T

49 lines
2.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
set -euo pipefail
repo_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
tool_dir="$repo_root/plasma-task-group-shortcuts"
topdir="$repo_root/rpmbuild"
source_dir="$topdir/SOURCES/plasma-task-group-shortcuts-0.1.0"
mkdir -p "$topdir"/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
mkdir -p "$source_dir/tests"
install -m 0644 "$tool_dir/CMakeLists.txt" "$source_dir/CMakeLists.txt"
install -m 0644 "$tool_dir/keyboardlayout.cpp" "$source_dir/keyboardlayout.cpp"
install -m 0644 "$tool_dir/keyboardlayout.h" "$source_dir/keyboardlayout.h"
install -m 0644 "$tool_dir/main.cpp" "$source_dir/main.cpp"
install -m 0644 "$tool_dir/pendingselection.cpp" "$source_dir/pendingselection.cpp"
install -m 0644 "$tool_dir/pendingselection.h" "$source_dir/pendingselection.h"
install -m 0644 "$tool_dir/windowpreview.cpp" "$source_dir/windowpreview.cpp"
install -m 0644 "$tool_dir/windowpreview.h" "$source_dir/windowpreview.h"
install -m 0644 "$tool_dir/Preview.qml" "$source_dir/Preview.qml"
install -m 0644 "$tool_dir/TaskbarGeometry.qml" "$source_dir/TaskbarGeometry.qml"
install -m 0644 "$tool_dir/taskbargeometry.cpp" "$source_dir/taskbargeometry.cpp"
install -m 0644 "$tool_dir/taskbargeometry.h" "$source_dir/taskbargeometry.h"
install -m 0644 "$tool_dir/previewplacement.cpp" "$source_dir/previewplacement.cpp"
install -m 0644 "$tool_dir/previewplacement.h" "$source_dir/previewplacement.h"
install -m 0644 "$tool_dir/tests/test-pendingselection.cpp" "$source_dir/tests/test-pendingselection.cpp"
install -m 0644 "$tool_dir/tests/test-preview.cpp" "$source_dir/tests/test-preview.cpp"
install -m 0644 "$tool_dir/taskselection.cpp" "$source_dir/taskselection.cpp"
install -m 0644 "$tool_dir/taskselection.h" "$source_dir/taskselection.h"
install -m 0644 "$tool_dir/tests/test-taskselection.cpp" \
"$source_dir/tests/test-taskselection.cpp"
install -m 0644 "$tool_dir/tests/test-keyboardlayout.cpp" \
"$source_dir/tests/test-keyboardlayout.cpp"
install -m 0644 "$tool_dir/se.ajpanton.plasma-task-group-shortcuts.desktop" \
"$source_dir/se.ajpanton.plasma-task-group-shortcuts.desktop"
install -m 0644 "$tool_dir/se.ajpanton.plasma-task-group-shortcuts-autostart.desktop" \
"$source_dir/se.ajpanton.plasma-task-group-shortcuts-autostart.desktop"
tar -C "$topdir/SOURCES" -czf \
"$topdir/SOURCES/plasma-task-group-shortcuts-0.1.0.tar.gz" \
plasma-task-group-shortcuts-0.1.0
install -m 0644 "$repo_root/LICENSE" "$topdir/SOURCES/LICENSE"
install -m 0644 "$repo_root/README.md" "$topdir/SOURCES/README.md"
rpmbuild \
--define "_topdir $topdir" \
-bb "$tool_dir/plasma-task-group-shortcuts.spec"