< prev index next >
src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/template.spec
Print this page
@@ -30,11 +30,14 @@
mkdir -p %{buildroot}INSTALLATION_DIRECTORY
cp -r %{_sourcedir}/APPLICATION_FS_NAME %{buildroot}INSTALLATION_DIRECTORY
%files
APPLICATION_LICENSE_FILE
-INSTALLATION_DIRECTORY/APPLICATION_FS_NAME
+# If installation directory for the application is /a/b/c, we want only root
+# component of the path (/a) in the spec file to make sure all subdirectories
+# are owned by the package.
+%(echo INSTALLATION_DIRECTORY/APPLICATION_FS_NAME | sed -e "s|\(^/[^/]\{1,\}\).*$|\1|")
%post
if [ "RUNTIME_INSTALLER" != "true" ]; then
ADD_LAUNCHERS_INSTALL
xdg-desktop-menu install --novendor INSTALLATION_DIRECTORY/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop
< prev index next >