On Wednesday, 6 August 2025 14:52:03 Central European Summer Time D. Graef via
Pan-users wrote:
> Pan tries to load this file:
>
> /usr/local/share/pan/icons/icon_status_error.png
>
> but it is located here:
>
> /usr/share/pan/icons/icon_status_error.png
>
> I'm using this statement in the RPM SPEC file:
>
> %{_datadir}/pan/icons/*png
>
> %{_datadir} is defined as: /usr/share
ok, let's backtrack a little.
In Pan's config-cmake.h.in, the icon path is defined with:
#define PAN_SYSTEM_ICON_PATH "@CMAKE_INSTALL_FULL_DATAROOTDIR@/pan/icons"
This variable is derived from CMAKE_INSTALL_PREFIX which defaults to
/usr/local/ on Unix.
The trick is that we (as RedHat or Debian), want to use a /usr prefix at build
time (so that PAN_SYSTEM_ICON_PATH compiled in Pan is /usr/share/pan/icons) and
use another path when running cmake install while building a package to install
pan files in a pseudo root that is later used to create the package files.
On Debian (cf pan build log [1]) the fist step is done with:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None
-DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
-DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles"
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu
-DENABLE_MANUAL=1 -DWANT_DBUS=1 -DWANT_GKR=1 -DWANT_NOTIFY=1 -DWANT_GMIME=0 ..
I don't think all options are needed, but the "-DCMAKE_INSTALL_PREFIX=/usr"
option is key
On Debian, the 2nd step is done by invoking make directly (and not cmake):
make -j6 install DESTDIR=/build/reproducible-path/pan-0.162/debian/pan
AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true"
In your spec file, the first call to cmake is done with:
cmake -B std-build
You should try this first step with -DCMAKE_INSTALL_PREFIX=/usr :
cmake -B std-build -DCMAKE_INSTALL_PREFIX=/usr
I think you can avoid running make directly. These lines look fine:
%install
cmake --install std-build --prefix %{buildroot}/usr
HTH
[1]
https://buildd.debian.org/status/fetch.php?pkg=pan&arch=amd64&ver=0.162-1&stamp=1739898750&raw=0
_______________________________________________
Pan-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/pan-users