# # Fedora/RPM spec for Miryu Start — a Windows 11 style start menu for KDE Plasma 6 # # 构建: # rpmdev-setuptree # cp miryu-start.spec ~/rpmbuild/SPECS/ # spectool -g -R miryu-start.spec # 下载 Source0 # rpmbuild -ba miryu-start.spec %global plugin_name org.miryugaming.start %global plugin_dir %{_datadir}/plasma/plasmoids/%{plugin_name} %global gettext_domain plasma_applet_%{plugin_name} Name: miryu-start Version: 45.0.0 Release: 1%{?dist} Summary: Windows 11 style start menu with KDE Connect mobile panel License: GPL-3.0-or-later URL: https://github.com/evernightvista/miryu-start # 用户指定的 GitHub main 快照 URL;解压后顶层目录为 miryu-start-main/ Source0: https://github.com/evernightvista/miryu-start/archive/refs/heads/main.zip # 纯 QML plasmoid:无 C++ 代码,不做任何编译,只需要把 .po 编译为 .mo BuildRequires: gettext # Source0 是 .zip,需要 unzip 让 rpm 的 autosetup 解压 BuildRequires: unzip # Plasma 6 plasmoid,安装到 %{plugin_dir} 即可由 kpackagetool6 加载 Requires: plasma-workspace Requires: kde-connect Requires: python3 Requires: qt6-qttools BuildArch: noarch %description Miryu Start %prep # GitHub zip 解压后顶层目录名为 miryu-start-main/ %autosetup -n miryu-start-main %build # 只有翻译需要 "编译":.po → .mo cd translate sh build.sh %install rm -rf %{buildroot} # === 1. Plasma 6 plasmoid 私有安装 === install -d %{buildroot}%{plugin_dir} cp -a metadata.json %{buildroot}%{plugin_dir}/ cp -a contents %{buildroot}%{plugin_dir}/ # === 2. 把编译好的 .mo 同时装到系统标准 locale 目录 === # %find_lang 默认在 %{_datadir}/locale 下扫,所以我们把 .mo 拷一份过去 # 两份都保留:plasma 私有目录给 plasmoid 加载;系统目录给 gettext / %find_lang install -d %{buildroot}%{_datadir}/locale cp -a %{buildroot}%{plugin_dir}/contents/locale/* %{buildroot}%{_datadir}/locale/ # === 3. 权限规整 === find %{buildroot}%{plugin_dir} -type d -exec chmod 0755 {} \; find %{buildroot}%{plugin_dir} -type f -exec chmod 0644 {} \; find %{buildroot}%{_datadir}/locale -type d -exec chmod 0755 {} \; find %{buildroot}%{_datadir}/locale -type f -exec chmod 0644 {} \; # translate/ 里的 .po 源文件不打包 —— 只装编译后的 .mo # === 4. LICENSE / README === install -d %{buildroot}%{_datadir}/licenses/%{name} install -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/ install -d %{buildroot}%{_datadir}/doc/%{name} install -m 0644 README.md %{buildroot}%{_datadir}/doc/%{name}/ # === 5. 让 RPM 在 %{_datadir}/locale/ 里自动发现所有 .mo === # 用默认路径,不再用 --subdir(不同 Fedora 版本 --subdir 行为不一致) %find_lang %{gettext_domain} %files -f %{gettext_domain}.lang %license %{_datadir}/licenses/%{name}/LICENSE %doc %{_datadir}/doc/%{name}/README.md %dir %{plugin_dir} %{plugin_dir}/metadata.json %{plugin_dir}/contents/config/ %{plugin_dir}/contents/icons/ %{plugin_dir}/contents/ui/ %dir %{plugin_dir}/contents %dir %{plugin_dir}/contents/locale %changelog * Tue Oct 20 2026 KairikiFedora <13278297951@sina.cn> - 45.0.0-1 - Initial RPM package for Miryu Start 1.0 - Pure QML Plasma 6 plasmoid; translation-only in %%build - Install path: %%{_datadir}/plasma/plasmoids/org.miryugaming.start/ - GPL-3.0-or-later - .mo installed in both plasmoid private locale dir and %%{_datadir}/locale/ so %%find_lang works with its default scan path