diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2022-02-21 03:01:18 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2022-02-21 03:01:18 -0600 |
commit | f289105e5e41a0fe91572cb7c9ccdfb35ea3fa24 (patch) | |
tree | 9d4e7ea90c719472bf8e9b36627c3258ff95b982 /office/basket | |
parent | 934ec4aeeba63f07817751f2b94f5a2465daa84d (diff) |
office/basket: Fix writes outside DESTDIR during build
Diffstat (limited to 'office/basket')
-rw-r--r-- | office/basket/basket.SlackBuild | 9 | ||||
-rw-r--r-- | office/basket/no-write-outside-destdir.patch | 19 |
2 files changed, 28 insertions, 0 deletions
diff --git a/office/basket/basket.SlackBuild b/office/basket/basket.SlackBuild index b16c969bce545..edffc8a67e6ea 100644 --- a/office/basket/basket.SlackBuild +++ b/office/basket/basket.SlackBuild @@ -79,6 +79,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/no-write-outside-destdir.patch + mkdir build cd build cmake \ @@ -94,6 +96,13 @@ cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +mkdir -p $PKG/usr/share/applications +cp src/basket.desktop $PKG/usr/share/applications +chmod 0755 $PKG/usr/share/applications/* + +mkdir -p $PKG/usr/share/mime/packages/ +cp file-integration/basket.xml $PKG/usr/share/mime/packages/ + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ AUTHORS COPYING INSTALL README.md \ diff --git a/office/basket/no-write-outside-destdir.patch b/office/basket/no-write-outside-destdir.patch new file mode 100644 index 0000000000000..31795b1a7f69b --- /dev/null +++ b/office/basket/no-write-outside-destdir.patch @@ -0,0 +1,19 @@ +diff -Nur basket-2.49b.orig/file-integration/CMakeLists.txt basket-2.49b/file-integration/CMakeLists.txt +--- basket-2.49b.orig/file-integration/CMakeLists.txt 2019-02-27 14:33:04.000000000 -0600 ++++ basket-2.49b/file-integration/CMakeLists.txt 2022-02-21 02:59:10.390850529 -0600 +@@ -11,15 +11,4 @@ + + ########### install files ############### + +-find_program(XDG-MIME_EXECUTABLE xdg-mime) +-find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu) +- + install(FILES basketthumbcreator.desktop DESTINATION ${SERVICES_INSTALL_DIR}) +-install(CODE " +-execute_process(COMMAND ${XDG-MIME_EXECUTABLE} install --novendor +- ${CMAKE_CURRENT_SOURCE_DIR}/basket.xml) +-execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install +- --novendor ${CMAKE_SOURCE_DIR}/src/basket.desktop) +-execute_process(COMMAND ${XDG-MIME_EXECUTABLE} default +- ${CMAKE_SOURCE_DIR}/src/basket.desktop application/x-basket-item) +-") |