Skip to content

Commit 02a6b2d

Browse files
committed
chore(release): support rpm
1 parent 8ce1aaa commit 02a6b2d

File tree

12 files changed

+160
-55
lines changed

12 files changed

+160
-55
lines changed

.github/workflows/linux-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,23 @@ jobs:
105105
mv Ciyue-x86_64.AppImage Ciyue-latest-x86_64.AppImage
106106
mv Ciyue-x86_64.AppImage.zsync Ciyue-latest-x86_64.AppImage.zsync
107107
108+
- name: Install fastforge
109+
run: dart pub global activate fastforge
110+
108111
- name: Build Deb
109112
if: ${{ inputs.package_release_artifacts }}
110113
run: |
111114
fastforge package --platform linux --targets deb --skip-clean
112115
mv dist/*/*.deb .
113116
mv *.deb ciyue-x86_64.deb
114117
118+
- name: Build rpm
119+
if: ${{ inputs.package_release_artifacts }}
120+
run: |
121+
pacman -S --noconfirm rpmdevtools
122+
./tools/build_rpm.sh
123+
mv ciyue-*.x86_64.rpm ciyue.x86_64.rpm
124+
115125
- name: Upload bundle
116126
if: ${{ !inputs.package_release_artifacts }}
117127
uses: actions/upload-artifact@v4
@@ -129,3 +139,4 @@ jobs:
129139
Ciyue-latest-x86_64.AppImage
130140
*.zsync
131141
ciyue-x86_64.deb
142+
ciyue-x86_64.rpm

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ appimagetool
5959

6060
# fastforge
6161
dist/
62+
63+
# rpm
64+
*.rpm

GEMINI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ The project uses `justfile` to manage common development tasks.
4040
| **Migrations** | `just make-migrations` | Generates database migrations using Drift. |
4141
| **Icons** | `just icon` | Generates app launcher icons. |
4242
| **Count Code** | `just count-codes` | Counts lines of code excluding generated files. |
43+
| **Package AppImage** | `just build-appimage` | Builds a Linux AppImage. |
44+
| **Package RPM** | `just build-rpm` | Builds a Linux RPM package. |
4345

4446
### Standard Flutter Commands
4547
* **Run:** `flutter run`

justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ count-codes:
1212

1313
build-appimage:
1414
./tools/build_appimage.sh
15+
16+
build-rpm:
17+
./tools/build_rpm.sh

linux/appimage/org.eu.mumulhl.ciyue.metainfo.xml

Lines changed: 0 additions & 47 deletions
This file was deleted.

linux/packaging/deb/make_config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ categories:
2020
- Languages
2121

2222
startup_notify: true
23-
# You can also specify [metainfo](https://freedesktop.org/software/appstream/docs/chap-Quickstart.html) file
24-
# which contains metadata of the app.
23+
2524
metainfo: linux/packaging/org.eu.mumulhl.ciyue.metainfo.xml
File renamed without changes.

linux/packaging/org.eu.mumulhl.ciyue.metainfo.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,27 @@
77

88
<metadata_license>CC0-1.0</metadata_license>
99
<project_license>MIT</project_license>
10+
11+
<developer id="org.eu.mumulhl">
12+
<name>mumu-lhl</name>
13+
</developer>
14+
15+
<url type="homepage">https://github.com/mumu-lhl/Ciyue</url>
16+
<url type="bugtracker">https://github.com/mumu-lhl/Ciyue/issues</url>
17+
<url type="vcs-browser">https://github.com/mumu-lhl/Ciyue</url>
1018

1119
<description>
1220
<p>
13-
📄 Support MDX/MDD (not on Linux yet) 🔍 Support multiple dictionaries search and display 🎨 Support Material You 🌐 AI Translate (Support OpenAI, Gemini, Deepseek...) 🔈 Support reading aloud 🔖 Bookmarking words to the word book
21+
Ciyue is a comprehensive dictionary application built with Flutter. It supports MDX/MDD dictionary formats and offers a modern user experience with Material You design.
1422
</p>
23+
<ul>
24+
<li>Support MDX/MDD dictionary formats</li>
25+
<li>Multiple dictionaries search and display</li>
26+
<li>Material You dynamic colors support</li>
27+
<li>AI-powered translation and word explanation</li>
28+
<li>Text-to-speech (TTS) support</li>
29+
<li>Word book and history management</li>
30+
</ul>
1531
</description>
1632

1733
<launchable type="desktop-id">org.eu.mumulhl.ciyue.desktop</launchable>
@@ -26,4 +42,6 @@
2642
<provides>
2743
<binary>ciyue</binary>
2844
</provides>
45+
46+
<content_rating type="oars-1.1" />
2947
</component>

linux/packaging/rpm/ciyue.spec

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Name: ciyue
2+
Version: @VERSION@
3+
Release: @RELEASE@
4+
Summary: A simple mdict dictionary
5+
License: MIT
6+
URL: https://github.com/mumu-lhl/Ciyue
7+
8+
%description
9+
A simple mdict dictionary with Android/Windows/Linux support.
10+
Multi-dictionary support, AI integration, and Material You design.
11+
12+
%install
13+
mkdir -p %{buildroot}/usr/bin
14+
mkdir -p %{buildroot}/opt/%{name}
15+
cp -r @BUNDLE_DIR@/* %{buildroot}/opt/%{name}/
16+
ln -s /opt/%{name}/%{name} %{buildroot}/usr/bin/%{name}
17+
18+
# Desktop file
19+
mkdir -p %{buildroot}/usr/share/applications
20+
cp @DESKTOP_FILE@ %{buildroot}/usr/share/applications/
21+
22+
# Icon
23+
mkdir -p %{buildroot}/usr/share/icons/hicolor/256x256/apps
24+
cp @ICON_PATH@ %{buildroot}/usr/share/icons/hicolor/256x256/apps/%{name}.png
25+
26+
# Metainfo
27+
mkdir -p %{buildroot}/usr/share/metainfo
28+
cp @METAINFO_FILE@ %{buildroot}/usr/share/metainfo/org.eu.mumulhl.ciyue.appdata.xml
29+
30+
%files
31+
/opt/%{name}/
32+
/usr/bin/%{name}
33+
/usr/share/applications/org.eu.mumulhl.ciyue.desktop
34+
/usr/share/icons/hicolor/256x256/apps/%{name}.png
35+
/usr/share/metainfo/org.eu.mumulhl.ciyue.appdata.xml
36+
37+
%changelog
38+
* @DATE@ Ciyue Maintainers - @VERSION@-@RELEASE@
39+
- Automated RPM build

0 commit comments

Comments
 (0)