File: spec-debug-rules.template

package info (click to toggle)
gnustep-make 1.3.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,568 kB
  • ctags: 44
  • sloc: sh: 3,432; ansic: 852; makefile: 80; csh: 77; objc: 11
file content (66 lines) | stat: -rw-r--r-- 1,487 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
58
59
60
61
62
63
64
65
66
#
# Setup sources
#
%prep
%setup -n %{gs_name}-%{gs_version}

#
# Build commands
#
%build
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
  . %{gs_root}/Makefiles/GNUstep.sh 
fi
if [ "%{gs_configure}" = "YES" ]; then 
  CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{gs_root}
fi
make debug=no
make debug=yes

#
# Install commands (generate file list too)
#
%install
if [ -z "$GNUSTEP_SYSTEM_ROOT" ]; then
  . %{gs_root}/Makefiles/GNUstep.sh 
fi
# build the non debugging file list
mkdir tmp-rpm-build-%{gs_name}
make debug=no \
  INSTALL_ROOT_DIR=`pwd`/tmp-rpm-build-%{gs_name} \
  GNUSTEP_INSTALLATION_DIR=`pwd`/tmp-rpm-build-%{gs_name}/%{gs_install_dir} \
  filelist=yes install
rm -rf tmp-rpm-build-%{gs_name}

# build the debugging file list
make debug=yes \
  INSTALL_ROOT_DIR=$RPM_BUILD_ROOT \
  GNUSTEP_INSTALLATION_DIR=$RPM_BUILD_ROOT%{gs_install_dir} \
  filelist=yes install

# Now filter the debugging file list against the non debugging one
#
# We use `grep':
# `-f file-list' gets the lines to match from file-list
# `-x' gets only matches which match whole lines
# `-v' inverts the matching, so lines which do not match are outputted
#
mv file-list-debug file-list.tmp
for file in `cat file-list`; do
  grep -v -x $file file-list.tmp >> file-list-debug.tmp
  mv file-list-debug.tmp file-list.tmp
done

rm -f file-list-debug.tmp
mv file-list.tmp file-list-debug

#
# Clean commands
#
%clean
rm -rf $RPM_BUILD_ROOT

#
# File list (generated by `%install')
#
%files -f file-list-debug