Skip to content

Commit

Permalink
Merge pull request #69 from SaccharinGoat/improve_fedora_support
Browse files Browse the repository at this point in the history
Enhance RPM building and fix Nautilus thumbnails
  • Loading branch information
unlimitedbacon authored Nov 13, 2023
2 parents dec70d8 + 70c749c commit 4037370
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
25 changes: 10 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,13 @@ assets = [
["README.md", "usr/share/doc/stl-thumb/", "644"],
]

[package.metadata.rpm]
package = "stl-thumb"

[package.metadata.rpm.cargo]
buildflags = ["--release"]

[package.metadata.rpm.targets]
stl-thumb = { path = "/usr/bin/stl-thumb" }
"libstl_thumb.so" = { path = "/usr/lib64/libstl_thumb.so" }
"libstl_thumb.a" = { path = "/usr/lib64/libstl_thumb.a", mode = "644" }
"../../libstl_thumb.h" = { path = "/usr/include/libstl_thumb.h", mode = "644"}
"../../stl-thumb.thumbnailer" = { path = "/usr/share/thumbnailers/stl-thumb.thumbnailer", mode = "644"}
"../../stl-thumb-mime.xml" = { path = "/usr/share/mime/packages/stl-thumb-mime.xml", mode = "644"}
"../../README.md" = { path = "/usr/share/doc/stl-thumb/README.md", mode = "644"}

[package.metadata.generate-rpm]
assets = [
{ source = "./target/release/stl-thumb", dest = "/usr/bin/stl-thumb", mode = "755" },
{ source = "./target/release/libstl_thumb.so", dest = "/usr/lib64/libstl_thumb.so", mode = "755" },
{ source = "./target/release/libstl_thumb.a", dest = "/usr/lib64/libstl_thumb.a", mode = "644" },
{ source = "libstl_thumb.h", dest = "/usr/include/libstl_thumb.h", mode = "644" },
{ source = "stl-thumb.thumbnailer", dest = "/usr/share/thumbnailers/stl-thumb.thumbnailer", mode = "644" },
{ source = "stl-thumb-mime.xml", dest = "/usr/share/mime/packages/stl-thumb-mime.xml", mode = "644" },
{ source = "README.md", dest = "/usr/share/doc/stl-thumb/README.md", doc = true, mode = "644" }
]
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ $ sudo zypper install stl-thumb
## Building

### Building the tool itself:
If you get errors about fontconfig being missing, install the development package

You can build the debug version with:
```
$ cargo build
Expand All @@ -67,8 +69,8 @@ $ cargo deb
```
### Building the .rpm-package:
```
$ cargo install cargo-rpm #this is an additional dependency
$ cargo rpm build
$ cargo install generate-rpm #this is an additional dependency
$ cargo generate-rpm
```

## Command Line Usage
Expand Down
2 changes: 1 addition & 1 deletion obj-thumb.thumbnailer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Thumbnailer Entry]
TryExec=stl-thumb
Exec=stl-thumb -f png -s %s %i %o
Exec=xvfb-run --auto-servernum -w 0 stl-thumb -f png -s %s %i %o
MimeType=model/obj;
2 changes: 1 addition & 1 deletion stl-thumb.thumbnailer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Thumbnailer Entry]
TryExec=stl-thumb
Exec=stl-thumb -f png -s %s %i %o
Exec=xvfb-run --auto-servernum -w 0 stl-thumb -f png -s %s %i %o
MimeType=model/stl;model/x.stl-ascii;model/x.stl-binary;application/sla;

0 comments on commit 4037370

Please sign in to comment.