File: fix-install.patch

package info (click to toggle)
reglookup 1.0.1%2Bsvn296-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ansic: 6,676; python: 3,762; makefile: 40; sh: 27
file content (57 lines) | stat: -rw-r--r-- 2,419 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: Fix upstream SConstruct
 - install correctly the files
 - fix cflags and linkflags
Forwarded: not-needed
Author: Giovani Augusto Ferreira <giovani@riseup.net>
Author: Sven Geuer <sge@debian.org>
Last-Update: 2025-10-07
--- a/SConstruct
+++ b/SConstruct
@@ -10,9 +10,9 @@
 # package build, instead relying on CFLAGS/LDFLAGS to specify them when appropriate?
 cflags = '-std=gnu99 -pedantic -Wall -Werror=format-security -D_FILE_OFFSET_BITS=64 -fvisibility=hidden'
 cflags += ' -DREGFI_VERSION=\'"%s"\' ' % REGFI_VERSION
-cflags += os.environ.get('CFLAGS','-fPIE -pie -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2')
+cflags += '-fPIE ' + os.environ.get('CFLAGS','-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2')
 
-linkflags = "-fPIC " + os.environ.get('LDFLAGS',"-Wl,-z,relro,-z,now")
+linkflags = '-fPIE -pie ' + os.environ.get('LDFLAGS','-z relro -z now')
 
 lib_src = ['lib/regfi.c',
            'lib/winsec.c',
@@ -25,8 +25,8 @@
                   CC=cc,
                   CFLAGS=cflags,
                   LINKFLAGS=linkflags,
-                  CPPPATH=['include', '/usr/local/include', '/usr/include'],
-                  LIBPATH=['lib', '/usr/local/lib','/usr/lib'],
+                  CPPPATH=['include', '/usr/include'],
+                  LIBPATH=['lib', '/usr/lib'],
                   LIBS=['m', 'pthread', 'regfi', 'talloc'])
 
 
@@ -63,7 +63,6 @@
 mandir     = os.environ.get('MANDIR', prefix + 'man')
 
 install_bin = [destdir + bindir, destdir + mandir]
-install_lib = [destdir + libdir, destdir + includedir + '/regfi']
 
 env.Install(destdir+bindir, [reglookup, reglookup_recover, 'bin/reglookup-timeline'])
 libinstall = env.InstallVersionedLib(destdir+libdir, [libregfi, libregfi_static], SHLIBVERSION=ABI_VERSION)
@@ -99,7 +98,7 @@
                           Glob('python/pyregfi/*.py')+['doc/devel/Doxyfile.pyregfi', regfi_doc],
                           'doxygen doc/devel/Doxyfile.pyregfi')
 
-install_items = install_bin + install_lib + install_pyregfi
+install_items = install_bin + install_pyregfi
 
 # User Friendly Targets
 env.Alias('libregfi', libregfi)
@@ -109,7 +108,6 @@
 env.Alias('doc', [man_reglookup,man_reglookup_recover,man_reglookup_timeline])
 env.Alias('doc-devel', [regfi_doc, pyregfi_doc])
 env.Alias('install_bin', install_bin)
-env.Alias('install_lib', install_lib)
 env.Alias('install_pyregfi', install_pyregfi)
 env.Alias('install', install_items)