Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
build: add sfbrename
Browse files Browse the repository at this point in the history
    Bulk file renamer

Log: add software name--sfbrename
  • Loading branch information
wjyrich authored and kamiyadm committed Jan 31, 2024
1 parent 4ecce41 commit 73a5076
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
20 changes: 20 additions & 0 deletions io.github.sfbrename/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package:
id: io.github.sfbrename
name: sfbrename
version: 1.0.0
kind: app
description: |
Bulk file renamer
runtime:
id: org.deepin.Runtime
version: 23.0.0

source:
kind: git
url: https://github.com/karwler/sfbrename.git
commit: 2efee1430b95d2fc509b2b44a1762b0b3b206cf5
patch: patches/0001-install.patch

build:
kind: cmake
47 changes: 47 additions & 0 deletions io.github.sfbrename/patches/0001-install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 897c617f57faaa1cfcf9f0ac86145f6d2209cee0 Mon Sep 17 00:00:00 2001
From: wjyrich <[email protected]>
Date: Fri, 5 Jan 2024 20:15:01 +0800
Subject: [PATCH] install

---
CMakeLists.txt | 4 ++++
rsc/sfbrename.desktop | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 200c7fe..27dd666 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,7 @@ if(NOT CONSOLE)
endif()

add_executable(${PROJECT_NAME} WIN32 ${SRC_FILES})
+target_link_libraries(sfbrename -lz)
target_link_libraries(${PROJECT_NAME} ${PKGCONFS_LIBRARIES})
if(MINGW)
set(RESOURCE_OBJ "${CMAKE_BINARY_DIR}/sfbrename.res")
@@ -217,6 +218,9 @@ else()
endif()
endif()

+install(FILES rsc/sfbrename.desktop
+ DESTINATION share/applications)
+
if(APPIMAGE)
add_custom_target("uninstall"
COMMAND "${CMAKE_COMMAND}" -E remove -f "${CMAKE_INSTALL_PREFIX}/bin/${PROJECT_NAME}.AppImage"
diff --git a/rsc/sfbrename.desktop b/rsc/sfbrename.desktop
index f1e8738..9593b22 100755
--- a/rsc/sfbrename.desktop
+++ b/rsc/sfbrename.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=sfbrename
-Exec=usr/bin/sfbrename
+Exec=sfbrename
Icon=sfbrename
Comment=Tool for batch renaming files
GenericName=Bulk file renamer
--
2.33.1

0 comments on commit 73a5076

Please sign in to comment.