[go: up one dir, main page]

File: spec.sh

package info (click to toggle)
srecord 1.21-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,312 kB
  • ctags: 1,749
  • sloc: cpp: 15,381; sh: 6,122; makefile: 1,699; awk: 201; ansic: 46; vhdl: 15
file content (135 lines) | stat: -rw-r--r-- 3,544 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/bin/sh
#
#	srecord - manipulate eprom load files
#	Copyright (C) 1998, 2001, 2003 Peter Miller;
#	All rights reserved.
#
#	This program is free software; you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation; either version 2 of the License, or
#	(at your option) any later version.
#
#	This program is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program; if not, write to the Free Software
#	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
#
# MANIFEST: shell script to generate RedHat spec file
#
echo '#'
echo '# This file is generated.  Please do not send the maintainer'
echo '# patches to this file.  Please update etc/spec.sh and send a'
echo '# patch to that file, instead.'
echo '#'

version=${version-0.0.0}
echo 'Summary: Manipulate EPROM load files'
echo 'Name: srecord'
echo "Version: ${version}"
echo 'Release: 1'
echo 'License: GPL'
echo 'Group: Development/Tools'
echo "Source: http://srecord.sourceforge.net/%{name}-%{version}.tar.gz"
echo 'URL: http://srecord.sourceforge.net/'
echo 'BuildRoot: %{_tmppath}/%{name}-%{version}-root'

prefix=/usr
#
# RPM only has install-time relocatable packages.  It has no support for
# build-time relocatable packages.  Therefore, we must NOT specify a Spec
# prefix, or the installed locations will not match the built locations.
#
#echo "Prefix: $prefix"

cat << 'fubar'

%description
The SRecord package is a collection of powerful tools for manipulating
EPROM load files.

* The SRecord package understands a number of file formats: Motorola
  S-Record, Intel, Tektronix, Binary.  These file formats may be read
  and written.  Also C array definitions, for output only.

* The SRecord package has a number of tools: srec_cat for copying and
  and converting files, srec_cmp for comparing files and srec_info for
  printing summaries.

* The SRecord package has a number for filters: checksum to add checksums
  to the data, crop to keep address ranges, exclude to remove address
  ranges, fill to plug holes in the data, length to insert the data
  length, maximum to insert the data address maximum, minimum to insert
  the data address minimum, offset to adjust addresses, and split for
  wide data buses and memory striping.

More than one filter may be applied to each input file.  Different filters
may be applied to each input file.  All filters may be applied to all
file formats.


%prep
%setup -q
%configure


%build
make


%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
%makeinstall

strip $RPM_BUILD_ROOT%{_bindir}/*


%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"


%files
%defattr (-,root,root)
%doc LICENSE BUILDING README
fubar

#
# remember things for the %files section
#
files=

remember_prog()
{
	if eval "test \"\${prog_${1}-no}\" != yes"
	then
		eval "prog_${1}=yes"
		files="$files %{_bindir}/${1}"
	fi
}

for file in $*
do
	case $file in

	prog/*/main.cc)
		dir=`echo $file | sed 's|prog/\([^/]*\)/.*|\1|'`
		remember_prog $dir
		;;

	man/man[0-9]/*.[0-9])
		ff=`echo $file | sed 's|^man/||'`
		files="$files %{_mandir}/${ff}*"
		;;

	*)
		;;
	esac
done

for file in $files
do
	echo "$file"
done | sort