From ae21fb42351c4e9f20566ecd679d6b8052cd1e48 Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Wed, 17 Apr 2024 17:49:39 +0900 Subject: [PATCH] .github(Fedora): Rename the package The package name should have the prefix `obs-studio-plugin-`. --- .github/containers/fedora-common/build.sh | 10 ++++++---- ci/plugin.spec | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/containers/fedora-common/build.sh b/.github/containers/fedora-common/build.sh index 2aa04de..dc6d436 100755 --- a/.github/containers/fedora-common/build.sh +++ b/.github/containers/fedora-common/build.sh @@ -6,6 +6,7 @@ docker_image="$1" rpmbuild="$2" PLUGIN_NAME=$(awk '/^project\(/{print gensub(/project\(([^ ()]*).*/, "\\1", 1, $0)}' CMakeLists.txt) +PLUGIN_NAME_FEDORA="$(sed -e 's/^obs-/obs-studio-plugin-/' <<< "$PLUGIN_NAME")" eval $(git describe --tag --always --long | awk ' BEGIN { VERSION="unknown"; @@ -32,16 +33,17 @@ test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled && chcon -Rt contai # Prepare files sed \ -e "s/@PLUGIN_NAME@/$PLUGIN_NAME/g" \ + -e "s/@PLUGIN_NAME_FEDORA@/$PLUGIN_NAME_FEDORA/g" \ -e "s/@VERSION@/$VERSION/g" \ -e "s/@RELEASE@/$RELEASE/g" \ < ci/plugin.spec \ - > $rpmbuild/SPECS/$PLUGIN_NAME.spec + > $rpmbuild/SPECS/$PLUGIN_NAME_FEDORA.spec -git archive --format=tar --prefix=$PLUGIN_NAME-$VERSION/ HEAD | bzip2 > $rpmbuild/SOURCES/$PLUGIN_NAME-$VERSION.tar.bz2 +git archive --format=tar --prefix=$PLUGIN_NAME_FEDORA-$VERSION/ HEAD | bzip2 > $rpmbuild/SOURCES/$PLUGIN_NAME_FEDORA-$VERSION.tar.bz2 docker run -v $rpmbuild:/home/rpm/rpmbuild $docker_image bash -c " -sudo dnf builddep -y ~/rpmbuild/SPECS/$PLUGIN_NAME.spec && +sudo dnf builddep -y ~/rpmbuild/SPECS/$PLUGIN_NAME_FEDORA.spec && sudo chown 0.0 ~/rpmbuild/SOURCES/* && sudo chown 0.0 ~/rpmbuild/SPECS/* && -rpmbuild -ba ~/rpmbuild/SPECS/$PLUGIN_NAME.spec +rpmbuild -ba ~/rpmbuild/SPECS/$PLUGIN_NAME_FEDORA.spec " diff --git a/ci/plugin.spec b/ci/plugin.spec index 009c71a..fd91a39 100644 --- a/ci/plugin.spec +++ b/ci/plugin.spec @@ -1,4 +1,4 @@ -Name: @PLUGIN_NAME@ +Name: @PLUGIN_NAME_FEDORA@ Version: @VERSION@ Release: @RELEASE@%{?dist} Summary: Dummy command source plugin for OBS Studio @@ -7,6 +7,7 @@ License: GPLv2+ Source0: %{name}-%{version}.tar.bz2 BuildRequires: cmake, gcc, gcc-c++ BuildRequires: obs-studio-devel +Obsoletes: @PLUGIN_NAME@ < %{version} %description Command source plugin for OBS Studio provides a dummy source that execute @@ -23,5 +24,5 @@ arbitrary commands when a scene is switched. %{cmake_install} %files -%{_libdir}/obs-plugins/%{name}.so -%{_datadir}/obs/obs-plugins/%{name}/ +%{_libdir}/obs-plugins/@PLUGIN_NAME@.so +%{_datadir}/obs/obs-plugins/@PLUGIN_NAME@/