On Fri, Oct 2, 2020 at 10:17 AM Helg Green via devel <devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > https://github.com/SimplestStudio/simplest-studio/blob/master/simplest-studio.spec See the attached spec file, which gives me a successful build. I'll walk through what I changed from top to bottom. License: the name Fedora uses is "GPLv3", rather than "GPL-3". See https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#SoftwareLicenses. The "Short Name" column gives the name used in Fedora spec files. Group: Fedora no longer uses this, so I have removed it. Source0: with a full URL here, instead of just a filename, various tools are able to download the tarball automatically. For example, if you install the "rpmdevtools" package, then you can run "spectool -g simplest-studio.spec" and it will fetch the tarball. The "%{url}" part at the beginning is substituted with the value of the "URL:" field. BuildRequires: you need C++, not just C, so use gcc-c++ instead of gcc. The library header files need to be available at build time, not run time, so I have converted the libmediainfo and qt5-qtbase Requires into corresponding BuildRequires. You do not need Requires for them, because library Requires are generated automatically. After building the package, run this: "rpm -q --requires -p simplest-studio-1.1-1.fc34.x86_64.rpm". That will show you the generated Requires, which include these: libQt5Core.so.5()(64bit) libQt5Core.so.5(Qt_5)(64bit) libQt5Core.so.5(Qt_5.15)(64bit) libQt5Gui.so.5()(64bit) libQt5Gui.so.5(Qt_5)(64bit) libQt5Widgets.so.5()(64bit) libQt5Widgets.so.5(Qt_5)(64bit) libmediainfo.so.0()(64bit) Commented BuildArch: noarch line. This is wrong, so I removed it completely. %prep: The %autosetup macro is handy here. It unpacks the tarball and automatically applies any patches. Of course, there are no patches at present, but if you add any later, you don't have to remember to add %patch invocations for them. %build: I've completely replaced this. First, the shipped Makefile assumes that qmake is named qmake. In Fedora, it is named qmake-qt5 instead. I regenerated the Makefile first to embed the correct name and any Fedora changes into the Makefile. The generated Makefile does not use Fedora's build flags, so next is a sed invocation to fix that. Note that it also changes STRIP=strip to STRIP=. This was causing your problem with the debug package. I also changed the Makefile to install into /usr/bin instead of /opt, just because that's what distribution users expect. If you really want /opt, then remove that line and change the %files entry back to /opt. %install: the mkdir invocation is done automatically by rpm, so you do not need it in your spec file. %clean: this is done automatically by rpm, so you do not need it in your spec file. %postun: there is nothing in it, so it is not needed in the spec file. %files: README.md seems useful as documentation, so I added it. License files are specified with %license instead of %doc. I hope this helps. Note that this package cannot be distributed by Fedora due to its ffmpeg dependency, but RPM Fusion is a possibility. Regards, -- Jerry James http://www.jamezone.org/
Summary: Audio encoder Name: simplest-studio Version: 1.1 Release: 1%{?dist} License: GPLv3 URL: https://github.com/SimplestStudio/%{name} Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: libmediainfo-devel BuildRequires: qt5-qtbase-devel Requires: ffmpeg>=4.2 %description Simplest Studio is an application that allows you to convert audio files. %prep %autosetup %build # Regenerate the Makefile with the Fedora qmake name qmake-qt5 -o Makefile app/simplest_studio.pro -spec linux-g++ \ CONFIG+=qtquickcompiler # Modify the Makefile to use Fedora flags. This would not be necessary if the # Makefile allowed overriding variable settings (e.g., with ?=). sed -e 's|-pipe -O2 -Wall -Wextra|%{build_cflags}|' \ -e 's|-pipe -O2 -std=gnu++11 -Wall -Wextra|%{build_cxxflags}|' \ -e 's|-Wl,-O1|%{build_ldflags}|' \ -e 's|= strip|=|' \ -e 's|/opt/simplest_studio|%{_prefix}|' \ -i Makefile %make_build %install %make_install INSTALL_ROOT=%{buildroot} %files %doc ABOUT README.md %license LICENSE %{_bindir}/simplest_studio %changelog * Wed Sep 30 2020 Simplest Studio <depositmail@xxxxxxx> - Initial package for Fedora.
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx