File: 010_fix-makefile.patch

package info (click to toggle)
snowdrop 0.02b-17
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 312 kB
  • sloc: ansic: 2,251; makefile: 288
file content (42 lines) | stat: -rw-r--r-- 1,225 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: fix Makefile
Author: Joey Hess <joeyh@debian.org>, patch creation: Arno Töll <debian@toell.net>
Last-Update: 2025-09-12

* Makefile:
  + Make the Makefile honor $(DESTDIR)
  + Don't hide CFLAGS from dpkg-buildflags if used
    [Arno Töll]

--- snowdrop-0.02b.orig/Makefile
+++ snowdrop-0.02b/Makefile
@@ -26,9 +26,10 @@ VER	= 0.02b
 LANG    = eng engf c
 
 BINROOT = /usr/bin/
+DESTDIR = /
 
-CFLAGS  = -ggdb -O9 -fomit-frame-pointer -funroll-loops -fexpensive-optimizations \
-          -ffast-math -Wall 
+CFLAGS  += -ggdb -O2 -fomit-frame-pointer -funroll-loops -fexpensive-optimizations \
+          -ffast-math -Wall -g
 
 
 all: modules snowdrop toinstall
@@ -67,12 +68,12 @@ toinstall:
 clean:
 	rm -f sd-* *.o core core.* a.out
 
-install: modules snowdrop
-	@echo "[*] Installing binaries in $(BINROOT)..."
-	cp -f sd-* $(BINROOT)
+install:
+	@echo "[*] Installing binaries in $(DESTDIR)$(BINROOT)..."
+	cp -f sd-* $(DESTDIR)$(BINROOT)
 	@echo "[*] Installing synonyms database..."
-	@mkdir /usr/share/snowdrop || true
-	cp synonyms /usr/share/snowdrop/
+	@mkdir $(DESTDIR)/usr/share/snowdrop || true
+	cp synonyms $(DESTDIR)/usr/share/snowdrop/
 	@echo "[*] Installation complete."
 
 publish: clean