termux-packages/packages/unrar/makefile.patch
Henrik Grimler bb45eeefc7
unrar: update Makefile patch
So that we can install to TERMUX_PKG_MASSAGEDIR.
2022-02-11 21:26:28 +01:00

42 lines
1.0 KiB
Diff

--- ./makefile.orig 2021-05-25 19:02:31.081243251 +0000
+++ ./makefile 2021-05-25 19:02:50.741677177 +0000
@@ -2,14 +2,13 @@
# Makefile for UNIX - unrar
# Linux using GCC
-CXX=c++
-CXXFLAGS=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
-LIBFLAGS=-fPIC
+CXX?=c++
+CXXFLAGS?=-O2 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else
+LIBFLAGS=$(LDFLAGS)
DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP
-STRIP=strip
-AR=ar
-LDFLAGS=-pthread
-DESTDIR=/usr
+STRIP?=strip
+AR?=ar
+LDFLAGS?=-pthread
# Linux using LCC
#CXX=lcc
@@ -161,14 +160,14 @@
$(AR) rcs libunrar.a $(OBJECTS) $(LIB_OBJ)
install-unrar:
- install -D unrar $(DESTDIR)/bin/unrar
+ install -D unrar $(DESTDIR)$(PREFIX)/bin/unrar
uninstall-unrar:
rm -f $(DESTDIR)/bin/unrar
install-lib:
- install libunrar.so $(DESTDIR)/lib
- install libunrar.a $(DESTDIR)/lib
+ install libunrar.so $(DESTDIR)$(PREFIX)/lib
+ install libunrar.a $(DESTDIR)$(PREFIX)/lib
uninstall-lib:
rm -f $(DESTDIR)/lib/libunrar.so