lfp


Logs | Files | README | LICENSE | GitLab


1
commit 76610b3253ea4f2b5f4a734d15ea52c570264a1f
2
Author: Connor Etherington <[email protected]>
3
Date:   Sat Feb 17 05:27:12 2024 +0200
4
5
    Auto-Commit Update 17.02.2024 - 05:27:12
6
---
7
 Makefile | 28 ++++++++++++++++++----------
8
 1 file changed, 18 insertions(+), 10 deletions(-)
9
10
diff --git a/Makefile b/Makefile
11
index 8e0253e..b1f7631 100644
12
--- a/Makefile
13
+++ b/Makefile
14
@@ -1,6 +1,7 @@
15
 
16
 PKG = lfp
17
 PREVIEWER = lfpreviewer
18
+PKGDIR = build
19
 
20
 INFO = $(shell uname -a)
21
 OST = $(shell lsb_release -d | sed 's|Description:\s*||')
22
@@ -10,21 +11,21 @@ ifeq ($(OS),Ubuntu)
23
 	PACKAGE_MANAGER = apt
24
 	INSTALL = sudo ${PACKAGE_MANAGER}-get install
25
 	QUERY = sudo dpkg -S >/dev/null 2>&1
26
-	PKGS = python3-pip python3-setuptools libxres1
27
+	PKGS = python3-pip python3-setuptools libxres1 lsb-release
28
 endif
29
 
30
 ifeq ($(OS),Debian)
31
 	PACKAGE_MANAGER = apt
32
 	INSTALL = sudo ${PACKAGE_MANAGER}-get install
33
 	QUERY = sudo dpkg -S >/dev/null 2>&1
34
-	PKGS = python3-pip python3-setuptools libxres1
35
+	PKGS = python3-pip python3-setuptools libxres1 lsb-release
36
 endif
37
 
38
 ifeq ($(OS),Arch)
39
 	PACKAGE_MANAGER = pacman
40
 	INSTALL = sudo ${PACKAGE_MANAGER} -Syy
41
 	QUERY = sudo ${PACKAGE_MANAGER} -Qq >/dev/null 2>&1
42
-	PKGS = python-pip python-setuptools libxres
43
+	PKGS = python-pip python-setuptools libxres lsb-release
44
 endif
45
 
46
 ifeq ($(PACKAGE_MANAGER),)
47
@@ -43,15 +44,22 @@ lfpreviewer:
48
 
49
 lfp:
50
 	@echo -e "\n\e[1;33m[+]\e[0m Installing ${PKG}...\n"
51
-	@sudo install -Dm755 usr/bin/* -t "${PKGDIR}/usr/bin" || true
52
-	@sudo install -Dm755 usr/share/${PKG}/{${PKG},${PKG}cd,cleaner,scope} -t "${PKGDIR}/usr/share/${PKG}" || true
53
-	@sudo install -Dm644 usr/share/${PKG}/{${PKG}-icons,${PKG}rc} -t "${PKGDIR}/usr/share/${PKG}" || true
54
-	@sudo install -Dm644 usr/share/licenses/${PKG}/LICENSE "${PKGDIR}/usr/share/licenses/${PKG}/LICENSE" || true
55
-	@sudo install -Dm644 usr/share/doc/${PKG}/README.md "${PKGDIR}/usr/share/doc/${PKG}/README.md" || true
56
-	@sudo install -Dm644 usr/share/man/man1/${PKG}.1.gz "${PKGDIR}/usr/share/man/man1/${PKG}.1.gz" || true
57
+	@sudo install -Dm755 usr/bin/* -t "${PKGDIR}/bin" || true
58
+	@sudo install -Dm755 -d "${PKGDIR}/share/${PKG}/ocr" || true
59
+	@sudo install -Dm755 usr/share/${PKG}/ocr/* -t "${PKGDIR}/share/${PKG}/ocr" || true
60
+	@sudo install -Dm755 usr/share/${PKG}/{${PKG},${PKG}cd,cleaner,scope} -t "${PKGDIR}/share/${PKG}" || true
61
+	@sudo install -Dm644 usr/share/${PKG}/{${PKG}-icons,${PKG}rc} -t "${PKGDIR}/share/${PKG}" || true
62
+	@sudo install -Dm644 usr/share/licenses/${PKG}/LICENSE "${PKGDIR}/share/licenses/${PKG}/LICENSE" || true
63
+	@sudo install -Dm644 usr/share/doc/${PKG}/README.md "${PKGDIR}/share/doc/${PKG}/README.md" || true
64
+	@sudo install -Dm644 usr/share/man/man1/${PKG}.1.gz "${PKGDIR}/share/man/man1/${PKG}.1.gz" || true
65
 	@[ ! -d /usr/share/lfp ] && echo -e "\n\e[1;31m[-]\e[0m Please ensure you have sufficient premission to install ${PKG}." || true
66
 
67
-install: lfpreviewer lfp cd-on-exit
68
+system:
69
+	@PKGDIR = /
70
+
71
+install: system lfpreviewer lfp cd-on-exit
72
+
73
+build: lfpreviewer lfp cd-on-exit
74
 
75
 clean:
76
 	@echo -e "\n\e[1;33m[+]\e[0m Cleaning up..."