TerminalImageViewer
TerminalImageViewer copied to clipboard
Fedora Packaging Specfile
Hi! I am currently running a Fedora 35. I decided to package this software. It should work on both 35 and 36 without a hitch. I decided to dump a .spec
file that you can use to build the package for fedora
systems. I'm not sure about all rpm
-based systems, but this does work for Fedora.
How can we test this? Step by step instructions please.
You can check out these changes with something like this:
mkdir build
cp TerminalImageViewer.spec build
cd build
wget https://github.com/stefanhaustein/TerminalImageViewer/archive/refs/tags/v1.1.1.tar.gz
fedpkg --release f35 mockbuild
sudo dnf install -C -y results_TerminalImageViewer/1.1.1/1.fc35/TerminalImageViewer-1.1.1-1.fc35.x86_64.rpm
I hope this is useful for you. As of now I'll leave it at this but I will upload this to COPR at one point for automatic builds.
Is there no way to use some program to automatically build and install based on the specfile or something like that?
Hi. Sorry for the late reply. I'm not really familiar of a better way. I could make a simple Makefile
that automates the commands I outlined before, but it would basically simply invoke wget
and fedpkg
. The dnf install
command doesn't seem to be designed for installing source (as the Makefile
that currently exists does); it seems more like apt-get
in that sense. I have to warn you that I'm no expert in making fedora packages (this is my first one). Maybe there is a better way, but I don't know of one. All of the info I found is from Fedora's packaging tutorial.
I would be willing to maintain this package for fedora, but this would be my first time maintaining a fedora package. I'm currently hosting a COPR repo that builds this project. It takes the sources from the github releases (of the official repo) and builds them according to the specfile I'm proposing to merge. If you are not comfortable with a third-party (myself) hosting the copr then I'll take it down.
sudo dnf copr enable mvejnovic/TerminalImageViewer
sudo dnf install TerminalImageViewer
Do you think the copr
is a nice solution for building this project?
Aren't the package definitions typically inside / under control of the distributions?
Yeah, I think you're right -- maybe it's best if I keep the COPR up (I see utility from it) and we reject this PR? I can keep the COPR updated by forking from your main repo. Does that work?
Sure