]> err.no Git - sope/blob - gnustep-make/spec-debug-rules.template
Drop apache 1 build-dependency
[sope] / gnustep-make / spec-debug-rules.template
1 #
2 # Setup sources
3 #
4 %prep
5 %setup -n %{gs_name}-%{gs_version}
6
7 #
8 # Build commands
9 #
10 %build
11 if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
12   . %{gs_root}/Library/Makefiles/GNUstep.sh 
13 fi
14 if [ "%{gs_configure}" = "YES" ]; then 
15   CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{gs_root}
16 fi
17 make debug=no
18 make debug=yes
19
20 #
21 # Install commands (generate file list too)
22 #
23 %install
24 if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
25   . %{gs_root}/Library/Makefiles/GNUstep.sh 
26 fi
27 # build the non debugging file list
28 mkdir tmp-rpm-build-%{gs_name}
29 make debug=no \
30   INSTALL_ROOT_DIR=`pwd`/tmp-rpm-build-%{gs_name} \
31   GNUSTEP_INSTALLATION_DIR=`pwd`/tmp-rpm-build-%{gs_name}/%{gs_install_dir} \
32   filelist=yes install
33 rm -rf tmp-rpm-build-%{gs_name}
34
35 # build the debugging file list
36 make debug=yes \
37   INSTALL_ROOT_DIR=$RPM_BUILD_ROOT \
38   GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \
39   filelist=yes install
40
41 # Now filter the debugging file list against the non debugging one
42 #
43 # We use `grep':
44 # `-f file-list' gets the lines to match from file-list
45 # `-x' gets only matches which match whole lines
46 # `-v' inverts the matching, so lines which do not match are outputted
47 #
48 mv file-list-debug file-list.tmp
49 for file in `cat file-list`; do
50   grep -v -x $file file-list.tmp >> file-list-debug.tmp
51   mv file-list-debug.tmp file-list.tmp
52 done
53
54 rm -f file-list-debug.tmp
55 mv file-list.tmp file-list-debug
56
57 #
58 # Clean commands
59 #
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 #
64 # File list (generated by install)
65 #
66 %files -f file-list-debug