BlueGit

timfa posprint

Merge branch 'fix/pkgbuild-crlf'

timfa Tim Falken · pushed by timfa

Authored 2026-07-16 · 4 months ago

Hash
67300a28e7764ce3ab2b016cfcceac7183ae52aa
7 files changed +187 −183
.gitattributes +4 −1
@@ -1,3 +1,6 @@
1
2 1 *.sh text eol=lf
3 2 *.ps1 text eol=crlf
3 PKGBUILD text eol=lf
4 *.desktop text eol=lf
5 *.xml text eol=lf
6 *.md text eol=lf
@@ -1,3 +1,6 @@
1
2*.sh text eol=lf
1*.sh text eol=lf
3*.ps1 text eol=crlf
2*.ps1 text eol=crlf
3PKGBUILD text eol=lf
4*.desktop text eol=lf
5*.xml text eol=lf
6*.md text eol=lf
docs/BUILD.md +98 −98
@@ -1,98 +1,98 @@
1 # Build scripts
2
3 Local release builds for Windows and Linux.
4
5 ## Toolchain
6
7 You need a Rust toolchain (**1.88+**; CI uses 1.96). Install once:
8
9 ```bash
10 # Recommended (any distro)
11 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
12 # then restart the shell, or: source "$HOME/.cargo/env"
13
14 # Or on Arch Linux
15 sudo pacman -S --needed rust
16 ```
17
18 Also install the platform build libraries under **Linux build dependencies** below before `cargo test` / `cargo build`.
19
20 ## Windows
21
22 ```powershell
23 .\scripts\build-windows.ps1
24 ```
25
26 Output: `target\release\posprint.exe`
27
28 Options:
29
30 ```powershell
31 .\scripts\build-windows.ps1 -Deb:$false # exe only (default)
32 ```
33
34 ## Linux
35
36 ```bash
37 chmod +x scripts/build-linux.sh
38 ./scripts/build-linux.sh # release binary
39 ./scripts/build-linux.sh --deb # binary + .deb (prompts to install if interactive)
40 ./scripts/build-linux.sh --deb --install # build .deb and install with apt
41 ```
42
43 On **Arch Linux**:
44
45 ```bash
46 chmod +x scripts/build-arch.sh
47 ./scripts/build-arch.sh # .pkg.tar.zst (prompts to install if interactive)
48 ./scripts/build-arch.sh --install # build and install with pacman
49 ```
50
51 After a successful package build, both scripts ask whether to install (TTY only). Pass `--install` to skip the prompt and install automatically. Non-interactive runs (CI/pipes) never prompt.
52
53 Outputs:
54
55 | Artifact | Path |
56 |----------|------|
57 | Binary | `target/release/posprint` |
58 | Debian package | `target/debian/*.deb` |
59 | Arch package | `packaging/arch/posprint-*-x86_64.pkg.tar.zst` |
60
61 ### Linux targets we support
62
63 | Format | Distros | Notes |
64 |--------|---------|-------|
65 | **`.deb`** | Debian, Ubuntu, Mint, Pop!_OS, etc. | **Recommended** for apt-based systems; produced by `cargo-deb` |
66 | **`.pkg.tar.zst`** | Arch Linux, Manjaro, EndeavourOS, etc. | **Recommended** for pacman; `sudo pacman -U posprint-*.pkg.tar.zst` |
67 | **Raw binary** | Any x86_64 Linux | Copy `target/release/posprint`; needs X11/Wayland libs at runtime |
68 | **`.rpm`** | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with `fpm` if needed |
69 | **AppImage** | Universal | Not automated yet; good for portable distribution |
70
71 **Architecture:** `x86_64` (amd64) only in CI and build scripts today.
72
73 ### Linux build dependencies (Debian/Ubuntu)
74
75 ```bash
76 sudo apt-get install -y build-essential pkg-config \
77 libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
78 libssl-dev libudev-dev
79 ```
80
81 For `.deb`:
82
83 ```bash
84 cargo install cargo-deb --locked
85 ```
86
87 ### Arch Linux build dependencies
88
89 ```bash
90 sudo pacman -S --needed base-devel rust pkgconf openssl libxkbcommon libxcb dbus-libs \
91 wayland libx11 fontconfig freetype2 libglvnd git rsync
92 ```
93
94 ## Tests before release
95
96 ```bash
97 cargo test --release
98 ```
1 # Build scripts
2
3 Local release builds for Windows and Linux.
4
5 ## Toolchain
6
7 You need a Rust toolchain (**1.88+**; CI uses 1.96). Install once:
8
9 ```bash
10 # Recommended (any distro)
11 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
12 # then restart the shell, or: source "$HOME/.cargo/env"
13
14 # Or on Arch Linux
15 sudo pacman -S --needed rust
16 ```
17
18 Also install the platform build libraries under **Linux build dependencies** below before `cargo test` / `cargo build`.
19
20 ## Windows
21
22 ```powershell
23 .\scripts\build-windows.ps1
24 ```
25
26 Output: `target\release\posprint.exe`
27
28 Options:
29
30 ```powershell
31 .\scripts\build-windows.ps1 -Deb:$false # exe only (default)
32 ```
33
34 ## Linux
35
36 ```bash
37 chmod +x scripts/build-linux.sh
38 ./scripts/build-linux.sh # release binary
39 ./scripts/build-linux.sh --deb # binary + .deb (prompts to install if interactive)
40 ./scripts/build-linux.sh --deb --install # build .deb and install with apt
41 ```
42
43 On **Arch Linux**:
44
45 ```bash
46 chmod +x scripts/build-arch.sh
47 ./scripts/build-arch.sh # .pkg.tar.zst (prompts to install if interactive)
48 ./scripts/build-arch.sh --install # build and install with pacman
49 ```
50
51 After a successful package build, both scripts ask whether to install (TTY only). Pass `--install` to skip the prompt and install automatically. Non-interactive runs (CI/pipes) never prompt.
52
53 Outputs:
54
55 | Artifact | Path |
56 |----------|------|
57 | Binary | `target/release/posprint` |
58 | Debian package | `target/debian/*.deb` |
59 | Arch package | `packaging/arch/posprint-*-x86_64.pkg.tar.zst` |
60
61 ### Linux targets we support
62
63 | Format | Distros | Notes |
64 |--------|---------|-------|
65 | **`.deb`** | Debian, Ubuntu, Mint, Pop!_OS, etc. | **Recommended** for apt-based systems; produced by `cargo-deb` |
66 | **`.pkg.tar.zst`** | Arch Linux, Manjaro, EndeavourOS, etc. | **Recommended** for pacman; `sudo pacman -U posprint-*.pkg.tar.zst` |
67 | **Raw binary** | Any x86_64 Linux | Copy `target/release/posprint`; needs X11/Wayland libs at runtime |
68 | **`.rpm`** | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with `fpm` if needed |
69 | **AppImage** | Universal | Not automated yet; good for portable distribution |
70
71 **Architecture:** `x86_64` (amd64) only in CI and build scripts today.
72
73 ### Linux build dependencies (Debian/Ubuntu)
74
75 ```bash
76 sudo apt-get install -y build-essential pkg-config \
77 libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
78 libssl-dev libudev-dev
79 ```
80
81 For `.deb`:
82
83 ```bash
84 cargo install cargo-deb --locked
85 ```
86
87 ### Arch Linux build dependencies
88
89 ```bash
90 sudo pacman -S --needed base-devel rust pkgconf openssl libxkbcommon libxcb dbus-libs \
91 wayland libx11 fontconfig freetype2 libglvnd git rsync
92 ```
93
94 ## Tests before release
95
96 ```bash
97 cargo test --release
98 ```
@@ -1,98 +1,98 @@
1# Build scripts
1# Build scripts
2
2
3Local release builds for Windows and Linux.
3Local release builds for Windows and Linux.
4
4
5## Toolchain
5## Toolchain
6
6
7You need a Rust toolchain (**1.88+**; CI uses 1.96). Install once:
7You need a Rust toolchain (**1.88+**; CI uses 1.96). Install once:
8
8
9```bash
9```bash
10# Recommended (any distro)
10# Recommended (any distro)
11curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
11curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
12# then restart the shell, or: source "$HOME/.cargo/env"
12# then restart the shell, or: source "$HOME/.cargo/env"
13
13
14# Or on Arch Linux
14# Or on Arch Linux
15sudo pacman -S --needed rust
15sudo pacman -S --needed rust
16```
16```
17
17
18Also install the platform build libraries under **Linux build dependencies** below before `cargo test` / `cargo build`.
18Also install the platform build libraries under **Linux build dependencies** below before `cargo test` / `cargo build`.
19
19
20## Windows
20## Windows
21
21
22```powershell
22```powershell
23.\scripts\build-windows.ps1
23.\scripts\build-windows.ps1
24```
24```
25
25
26Output: `target\release\posprint.exe`
26Output: `target\release\posprint.exe`
27
27
28Options:
28Options:
29
29
30```powershell
30```powershell
31.\scripts\build-windows.ps1 -Deb:$false # exe only (default)
31.\scripts\build-windows.ps1 -Deb:$false # exe only (default)
32```
32```
33
33
34## Linux
34## Linux
35
35
36```bash
36```bash
37chmod +x scripts/build-linux.sh
37chmod +x scripts/build-linux.sh
38./scripts/build-linux.sh # release binary
38./scripts/build-linux.sh # release binary
39./scripts/build-linux.sh --deb # binary + .deb (prompts to install if interactive)
39./scripts/build-linux.sh --deb # binary + .deb (prompts to install if interactive)
40./scripts/build-linux.sh --deb --install # build .deb and install with apt
40./scripts/build-linux.sh --deb --install # build .deb and install with apt
41```
41```
42
42
43On **Arch Linux**:
43On **Arch Linux**:
44
44
45```bash
45```bash
46chmod +x scripts/build-arch.sh
46chmod +x scripts/build-arch.sh
47./scripts/build-arch.sh # .pkg.tar.zst (prompts to install if interactive)
47./scripts/build-arch.sh # .pkg.tar.zst (prompts to install if interactive)
48./scripts/build-arch.sh --install # build and install with pacman
48./scripts/build-arch.sh --install # build and install with pacman
49```
49```
50
50
51After a successful package build, both scripts ask whether to install (TTY only). Pass `--install` to skip the prompt and install automatically. Non-interactive runs (CI/pipes) never prompt.
51After a successful package build, both scripts ask whether to install (TTY only). Pass `--install` to skip the prompt and install automatically. Non-interactive runs (CI/pipes) never prompt.
52
52
53Outputs:
53Outputs:
54
54
55| Artifact | Path |
55| Artifact | Path |
56|----------|------|
56|----------|------|
57| Binary | `target/release/posprint` |
57| Binary | `target/release/posprint` |
58| Debian package | `target/debian/*.deb` |
58| Debian package | `target/debian/*.deb` |
59| Arch package | `packaging/arch/posprint-*-x86_64.pkg.tar.zst` |
59| Arch package | `packaging/arch/posprint-*-x86_64.pkg.tar.zst` |
60
60
61### Linux targets we support
61### Linux targets we support
62
62
63| Format | Distros | Notes |
63| Format | Distros | Notes |
64|--------|---------|-------|
64|--------|---------|-------|
65| **`.deb`** | Debian, Ubuntu, Mint, Pop!_OS, etc. | **Recommended** for apt-based systems; produced by `cargo-deb` |
65| **`.deb`** | Debian, Ubuntu, Mint, Pop!_OS, etc. | **Recommended** for apt-based systems; produced by `cargo-deb` |
66| **`.pkg.tar.zst`** | Arch Linux, Manjaro, EndeavourOS, etc. | **Recommended** for pacman; `sudo pacman -U posprint-*.pkg.tar.zst` |
66| **`.pkg.tar.zst`** | Arch Linux, Manjaro, EndeavourOS, etc. | **Recommended** for pacman; `sudo pacman -U posprint-*.pkg.tar.zst` |
67| **Raw binary** | Any x86_64 Linux | Copy `target/release/posprint`; needs X11/Wayland libs at runtime |
67| **Raw binary** | Any x86_64 Linux | Copy `target/release/posprint`; needs X11/Wayland libs at runtime |
68| **`.rpm`** | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with `fpm` if needed |
68| **`.rpm`** | Fedora, RHEL, openSUSE | Not automated yet; build binary and wrap with `fpm` if needed |
69| **AppImage** | Universal | Not automated yet; good for portable distribution |
69| **AppImage** | Universal | Not automated yet; good for portable distribution |
70
70
71**Architecture:** `x86_64` (amd64) only in CI and build scripts today.
71**Architecture:** `x86_64` (amd64) only in CI and build scripts today.
72
72
73### Linux build dependencies (Debian/Ubuntu)
73### Linux build dependencies (Debian/Ubuntu)
74
74
75```bash
75```bash
76sudo apt-get install -y build-essential pkg-config \
76sudo apt-get install -y build-essential pkg-config \
77 libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
77 libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev \
78 libssl-dev libudev-dev
78 libssl-dev libudev-dev
79```
79```
80
80
81For `.deb`:
81For `.deb`:
82
82
83```bash
83```bash
84cargo install cargo-deb --locked
84cargo install cargo-deb --locked
85```
85```
86
86
87### Arch Linux build dependencies
87### Arch Linux build dependencies
88
88
89```bash
89```bash
90sudo pacman -S --needed base-devel rust pkgconf openssl libxkbcommon libxcb dbus-libs \
90sudo pacman -S --needed base-devel rust pkgconf openssl libxkbcommon libxcb dbus-libs \
91 wayland libx11 fontconfig freetype2 libglvnd git rsync
91 wayland libx11 fontconfig freetype2 libglvnd git rsync
92```
92```
93
93
94## Tests before release
94## Tests before release
95
95
96```bash
96```bash
97cargo test --release
97cargo test --release
98```
98```
packaging/arch/PKGBUILD +54 −54
@@ -1,54 +1,54 @@
1 # Maintainer: posprint contributors
2 pkgname=posprint
3 pkgver=0.1.0
4 pkgrel=1
5 pkgdesc="Designer for POS-print documents with live preview and USB ESC/POS printing"
6 arch=('x86_64')
7 url="https://gitlab.com/Timfa/posprint"
8 license=('MIT')
9 depends=(
10 'gcc-libs'
11 'libxkbcommon'
12 'libxcb'
13 'openssl'
14 'dbus-libs'
15 'wayland'
16 'libx11'
17 'fontconfig'
18 'freetype2'
19 'libglvnd'
20 )
21 makedepends=('rust' 'cargo' 'pkgconf' 'git')
22 options=('!lto')
23 source=()
24 sha256sums=()
25
26 prepare() {
27 local root="$startdir/../.."
28 mkdir -p "$srcdir/$pkgname-$pkgver"
29 rsync -a \
30 --exclude target \
31 --exclude .git \
32 --exclude packaging/arch/pkg \
33 --exclude packaging/arch/src \
34 --exclude 'packaging/arch/*.pkg.tar.zst' \
35 --exclude 'packaging/arch/*.pkg.tar.zst.sig' \
36 "$root/" "$srcdir/$pkgname-$pkgver/"
37 }
38
39 build() {
40 cd "$srcdir/$pkgname-$pkgver"
41 cargo build --release --locked
42 }
43
44 package() {
45 cd "$srcdir/$pkgname-$pkgver"
46 install -Dm755 target/release/posprint "$pkgdir/usr/bin/posprint"
47 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
48 install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
49 install -Dm644 packaging/posprint.desktop "$pkgdir/usr/share/applications/posprint.desktop"
50 install -Dm644 packaging/mime/posprint.xml "$pkgdir/usr/share/mime/packages/posprint.xml"
51 install -Dm644 packaging/linux/posprint-print.desktop "$pkgdir/usr/share/kio/servicemenus/posprint-print.desktop"
52 install -Dm644 packaging/linux/posprint-print-thunar.xml "$pkgdir/usr/share/thunar/uca/posprint-print.xml"
53 install -Dm644 pos-logo.png "$pkgdir/usr/share/pixmaps/posprint.png"
54 }
1 # Maintainer: posprint contributors
2 pkgname=posprint
3 pkgver=0.1.0
4 pkgrel=1
5 pkgdesc="Designer for POS-print documents with live preview and USB ESC/POS printing"
6 arch=('x86_64')
7 url="https://gitlab.com/Timfa/posprint"
8 license=('MIT')
9 depends=(
10 'gcc-libs'
11 'libxkbcommon'
12 'libxcb'
13 'openssl'
14 'dbus-libs'
15 'wayland'
16 'libx11'
17 'fontconfig'
18 'freetype2'
19 'libglvnd'
20 )
21 makedepends=('rust' 'cargo' 'pkgconf' 'git')
22 options=('!lto')
23 source=()
24 sha256sums=()
25
26 prepare() {
27 local root="$startdir/../.."
28 mkdir -p "$srcdir/$pkgname-$pkgver"
29 rsync -a \
30 --exclude target \
31 --exclude .git \
32 --exclude packaging/arch/pkg \
33 --exclude packaging/arch/src \
34 --exclude 'packaging/arch/*.pkg.tar.zst' \
35 --exclude 'packaging/arch/*.pkg.tar.zst.sig' \
36 "$root/" "$srcdir/$pkgname-$pkgver/"
37 }
38
39 build() {
40 cd "$srcdir/$pkgname-$pkgver"
41 cargo build --release --locked
42 }
43
44 package() {
45 cd "$srcdir/$pkgname-$pkgver"
46 install -Dm755 target/release/posprint "$pkgdir/usr/bin/posprint"
47 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
48 install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
49 install -Dm644 packaging/posprint.desktop "$pkgdir/usr/share/applications/posprint.desktop"
50 install -Dm644 packaging/mime/posprint.xml "$pkgdir/usr/share/mime/packages/posprint.xml"
51 install -Dm644 packaging/linux/posprint-print.desktop "$pkgdir/usr/share/kio/servicemenus/posprint-print.desktop"
52 install -Dm644 packaging/linux/posprint-print-thunar.xml "$pkgdir/usr/share/thunar/uca/posprint-print.xml"
53 install -Dm644 pos-logo.png "$pkgdir/usr/share/pixmaps/posprint.png"
54 }
@@ -1,54 +1,54 @@
1# Maintainer: posprint contributors
1# Maintainer: posprint contributors
2pkgname=posprint
2pkgname=posprint
3pkgver=0.1.0
3pkgver=0.1.0
4pkgrel=1
4pkgrel=1
5pkgdesc="Designer for POS-print documents with live preview and USB ESC/POS printing"
5pkgdesc="Designer for POS-print documents with live preview and USB ESC/POS printing"
6arch=('x86_64')
6arch=('x86_64')
7url="https://gitlab.com/Timfa/posprint"
7url="https://gitlab.com/Timfa/posprint"
8license=('MIT')
8license=('MIT')
9depends=(
9depends=(
10 'gcc-libs'
10 'gcc-libs'
11 'libxkbcommon'
11 'libxkbcommon'
12 'libxcb'
12 'libxcb'
13 'openssl'
13 'openssl'
14 'dbus-libs'
14 'dbus-libs'
15 'wayland'
15 'wayland'
16 'libx11'
16 'libx11'
17 'fontconfig'
17 'fontconfig'
18 'freetype2'
18 'freetype2'
19 'libglvnd'
19 'libglvnd'
20)
20)
21makedepends=('rust' 'cargo' 'pkgconf' 'git')
21makedepends=('rust' 'cargo' 'pkgconf' 'git')
22options=('!lto')
22options=('!lto')
23source=()
23source=()
24sha256sums=()
24sha256sums=()
25
25
26prepare() {
26prepare() {
27 local root="$startdir/../.."
27 local root="$startdir/../.."
28 mkdir -p "$srcdir/$pkgname-$pkgver"
28 mkdir -p "$srcdir/$pkgname-$pkgver"
29 rsync -a \
29 rsync -a \
30 --exclude target \
30 --exclude target \
31 --exclude .git \
31 --exclude .git \
32 --exclude packaging/arch/pkg \
32 --exclude packaging/arch/pkg \
33 --exclude packaging/arch/src \
33 --exclude packaging/arch/src \
34 --exclude 'packaging/arch/*.pkg.tar.zst' \
34 --exclude 'packaging/arch/*.pkg.tar.zst' \
35 --exclude 'packaging/arch/*.pkg.tar.zst.sig' \
35 --exclude 'packaging/arch/*.pkg.tar.zst.sig' \
36 "$root/" "$srcdir/$pkgname-$pkgver/"
36 "$root/" "$srcdir/$pkgname-$pkgver/"
37}
37}
38
38
39build() {
39build() {
40 cd "$srcdir/$pkgname-$pkgver"
40 cd "$srcdir/$pkgname-$pkgver"
41 cargo build --release --locked
41 cargo build --release --locked
42}
42}
43
43
44package() {
44package() {
45 cd "$srcdir/$pkgname-$pkgver"
45 cd "$srcdir/$pkgname-$pkgver"
46 install -Dm755 target/release/posprint "$pkgdir/usr/bin/posprint"
46 install -Dm755 target/release/posprint "$pkgdir/usr/bin/posprint"
47 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
47 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
48 install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
48 install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
49 install -Dm644 packaging/posprint.desktop "$pkgdir/usr/share/applications/posprint.desktop"
49 install -Dm644 packaging/posprint.desktop "$pkgdir/usr/share/applications/posprint.desktop"
50 install -Dm644 packaging/mime/posprint.xml "$pkgdir/usr/share/mime/packages/posprint.xml"
50 install -Dm644 packaging/mime/posprint.xml "$pkgdir/usr/share/mime/packages/posprint.xml"
51 install -Dm644 packaging/linux/posprint-print.desktop "$pkgdir/usr/share/kio/servicemenus/posprint-print.desktop"
51 install -Dm644 packaging/linux/posprint-print.desktop "$pkgdir/usr/share/kio/servicemenus/posprint-print.desktop"
52 install -Dm644 packaging/linux/posprint-print-thunar.xml "$pkgdir/usr/share/thunar/uca/posprint-print.xml"
52 install -Dm644 packaging/linux/posprint-print-thunar.xml "$pkgdir/usr/share/thunar/uca/posprint-print.xml"
53 install -Dm644 pos-logo.png "$pkgdir/usr/share/pixmaps/posprint.png"
53 install -Dm644 pos-logo.png "$pkgdir/usr/share/pixmaps/posprint.png"
54}
54}
packaging/linux/posprint-print-thunar.xml +13 −13
@@ -1,13 +1,13 @@
1 <?xml version="1.0" encoding="UTF-8"?>
2 <actions>
3 <action>
4 <icon>posprint</icon>
5 <name>Print</name>
6 <command>posprint --print %f</command>
7 <description>Print POS receipt template</description>
8 <patterns>
9 <pattern>*.pos</pattern>
10 </patterns>
11 <startup-notify/>
12 </action>
13 </actions>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <actions>
3 <action>
4 <icon>posprint</icon>
5 <name>Print</name>
6 <command>posprint --print %f</command>
7 <description>Print POS receipt template</description>
8 <patterns>
9 <pattern>*.pos</pattern>
10 </patterns>
11 <startup-notify/>
12 </action>
13 </actions>
@@ -1,13 +1,13 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2<actions>
2<actions>
3<action>
3<action>
4 <icon>posprint</icon>
4 <icon>posprint</icon>
5 <name>Print</name>
5 <name>Print</name>
6 <command>posprint --print %f</command>
6 <command>posprint --print %f</command>
7 <description>Print POS receipt template</description>
7 <description>Print POS receipt template</description>
8 <patterns>
8 <patterns>
9 <pattern>*.pos</pattern>
9 <pattern>*.pos</pattern>
10 </patterns>
10 </patterns>
11 <startup-notify/>
11 <startup-notify/>
12</action>
12</action>
13</actions>
13</actions>
packaging/mime/posprint.xml +6 −6
@@ -1,6 +1,6 @@
1 <?xml version="1.0" encoding="UTF-8"?>
2 <mime-type xmlns="http://www.freedesktop.org/stand-alone/xml-mime-type">
3 <comment>POS print template</comment>
4 <glob pattern="*.pos"/>
5 <icon name="posprint"/>
6 </mime-type>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <mime-type xmlns="http://www.freedesktop.org/stand-alone/xml-mime-type">
3 <comment>POS print template</comment>
4 <glob pattern="*.pos"/>
5 <icon name="posprint"/>
6 </mime-type>
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2<mime-type xmlns="http://www.freedesktop.org/stand-alone/xml-mime-type">
2<mime-type xmlns="http://www.freedesktop.org/stand-alone/xml-mime-type">
3 <comment>POS print template</comment>
3 <comment>POS print template</comment>
4 <glob pattern="*.pos"/>
4 <glob pattern="*.pos"/>
5 <icon name="posprint"/>
5 <icon name="posprint"/>
6</mime-type>
6</mime-type>
packaging/posprint.desktop +10 −10
@@ -1,10 +1,10 @@
1 [Desktop Entry]
2 Type=Application
3 Name=posprint
4 Comment=POS receipt template designer
5 Exec=posprint %f
6 Icon=posprint
7 Terminal=false
8 Categories=Office;Utility;
9 MimeType=application/x-posprint;
10 StartupNotify=true
1 [Desktop Entry]
2 Type=Application
3 Name=posprint
4 Comment=POS receipt template designer
5 Exec=posprint %f
6 Icon=posprint
7 Terminal=false
8 Categories=Office;Utility;
9 MimeType=application/x-posprint;
10 StartupNotify=true
@@ -1,10 +1,10 @@
1[Desktop Entry]
1[Desktop Entry]
2Type=Application
2Type=Application
3Name=posprint
3Name=posprint
4Comment=POS receipt template designer
4Comment=POS receipt template designer
5Exec=posprint %f
5Exec=posprint %f
6Icon=posprint
6Icon=posprint
7Terminal=false
7Terminal=false
8Categories=Office;Utility;
8Categories=Office;Utility;
9MimeType=application/x-posprint;
9MimeType=application/x-posprint;
10StartupNotify=true
10StartupNotify=true
scripts/build-arch.sh +2 −1
@@ -47,7 +47,8 @@ if [[ "$SKIP_TESTS" != "true" ]]; then
47 47 fi
48 48
49 49 PKGVER="$(grep '^version' Cargo.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/')"
50 sed -i "s/^pkgver=.*/pkgver=${PKGVER}/" packaging/arch/PKGBUILD
50 # makepkg refuses PKGBUILDs with Windows (CRLF) line endings.
51 sed -i "s/\r$//; s/^pkgver=.*/pkgver=${PKGVER}/" packaging/arch/PKGBUILD
51 52
52 53 cd packaging/arch
53 54 MAKEPKG_FLAGS=(-f --noconfirm)
@@ -47,7 +47,8 @@ if [[ "$SKIP_TESTS" != "true" ]]; then
47fi
47fi
48
48
49PKGVER="$(grep '^version' Cargo.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/')"
49PKGVER="$(grep '^version' Cargo.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/')"
50sed -i "s/^pkgver=.*/pkgver=${PKGVER}/" packaging/arch/PKGBUILD
50# makepkg refuses PKGBUILDs with Windows (CRLF) line endings.
51sed -i "s/\r$//; s/^pkgver=.*/pkgver=${PKGVER}/" packaging/arch/PKGBUILD
51
52
52cd packaging/arch
53cd packaging/arch
53MAKEPKG_FLAGS=(-f --noconfirm)
54MAKEPKG_FLAGS=(-f --noconfirm)