Fixed package groups
[platform/upstream/elfutils.git] / packaging / elfutils.spec
1 %define keepstatic 1
2 Name:           elfutils
3 Version:        0.153
4 Release:        0
5 License:        GPL-2.0-with-osi-exception
6 Summary:        Higher-level library to access ELF
7 Url:            http://elfutils.fedorahosted.org
8 Group:          Base/Tools
9 Source:         elfutils-%{version}.tar.bz2
10 Source2:        baselibs.conf
11 BuildRequires:  automake
12 BuildRequires:  bison
13 BuildRequires:  bzip2-devel
14 BuildRequires:  flex
15 BuildRequires:  xz-devel
16 BuildRequires:  zlib-devel
17
18 %description
19 This package provides a higher-level library to access ELF files. This
20 is a part of elfutils package.
21
22 %package -n libasm
23 Summary:        A collection of utilities and DSOs to handle compiled objects
24 Group:          Base/Libraries
25
26 %description -n libasm
27 Elfutils is a collection of utilities, including ld (a linker), nm (for
28 listing symbols from object files), size (for listing the section sizes
29 of an object or archive file), strip (for discarding symbols), readline
30 (the see the raw ELF file structures), and elflint (to check for
31 well-formed ELF files).  Also included are numerous helper libraries
32 which implement DWARF, ELF, and machine-specific ELF handling.
33
34 %package -n libasm-devel
35 License:        GPL-2.0-with-osi-exception
36 Summary:        A collection of utilities and DSOs to handle compiled objects
37 Group:          Development/Libraries
38 Requires:       glibc-devel
39 Requires:       libasm = %{version}
40
41 %description -n libasm-devel
42 Elfutils is a collection of utilities, including ld (a linker), nm (for
43 listing symbols from object files), size (for listing the section sizes
44 of an object or archive file), strip (for discarding symbols), readline
45 (the see the raw ELF file structures), and elflint (to check for
46 well-formed ELF files).  Also included are numerous helper libraries
47 which implement DWARF, ELF, and machine-specific ELF handling.
48
49 %package -n libebl
50 License:        GPL-2.0-with-osi-exception
51 Summary:        A collection of utilities and DSOs to handle compiled objects
52 Group:          Base/Libraries
53
54 %description -n libebl
55 Elfutils is a collection of utilities, including ld (a linker), nm (for
56 listing symbols from object files), size (for listing the section sizes
57 of an object or archive file), strip (for discarding symbols), readline
58 (the see the raw ELF file structures), and elflint (to check for
59 well-formed ELF files).  Also included are numerous helper libraries
60 which implement DWARF, ELF, and machine-specific ELF handling.
61
62 %package -n libebl-devel
63 License:        GPL-2.0-with-osi-exception
64 Summary:        Include Files and Libraries mandatory for Development
65 Group:          Development/Libraries
66 Requires:       glibc-devel
67 Requires:       libdw-devel = %{version}
68 Requires:       libebl = %{version}
69
70 %description -n libebl-devel
71 This package contains all necessary include files and libraries needed
72 to develop applications that require these.
73
74 %package -n libelf
75 License:        GPL-2.0-with-osi-exception
76 Summary:        Library to read and write ELF files
77 Group:          Base/Libraries
78
79 %description -n libelf
80 This package provides a high-level library to read and write ELF files.
81 This is a part of elfutils package.
82
83 %package -n libelf-devel
84 License:        GPL-2.0-with-osi-exception
85 Summary:        Include Files and Libraries mandatory for Development
86 Group:          Development/Libraries
87 Requires:       glibc-devel
88 Requires:       libelf = %{version}
89 Conflicts:      libelf0-devel
90
91 %description -n libelf-devel
92 This package contains all necessary include files and libraries needed
93 to develop applications that require these.
94
95 %package -n libdw
96 License:        GPL-2.0-with-osi-exception
97 Summary:        Library to access DWARF debugging information
98 Group:          Base/Libraries
99
100 %description -n libdw
101 This package provides a high-level library to access the DWARF debugging
102 information.  This is a part of elfutils package.
103
104 %package -n libdw-devel
105 License:        GPL-2.0-with-osi-exception
106 Summary:        Include Files and Libraries mandatory for Development
107 Group:          Development/Libraries
108 Requires:       glibc-devel
109 Requires:       libdw = %{version}
110 Requires:       libelf-devel = %{version}
111
112 %description -n libdw-devel
113 This package contains all necessary include files and libraries needed
114 to develop applications that require these.
115
116 %prep
117 %setup -q -n elfutils-%{version}
118
119 %build
120 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")"
121 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
122 TIME="\"$(date -d "${modified}" "+%%R")\""
123 find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
124 autoreconf -fi
125 %configure --program-prefix=eu-
126 make %{?_smp_mflags}
127
128 %install
129 %make_install
130 # remove unneeded files
131 ls -lR %{buildroot}%{_libdir}/libelf*
132
133 %post -n libebl -p /sbin/ldconfig
134
135 %post -n libelf -p /sbin/ldconfig
136
137 %post -n libdw -p /sbin/ldconfig
138
139 %postun -n libebl -p /sbin/ldconfig
140
141 %postun -n libelf -p /sbin/ldconfig
142
143 %postun -n libdw -p /sbin/ldconfig
144
145 %files
146 %defattr(-,root,root)
147 %{_bindir}/*
148
149 %files -n libasm
150 %defattr(-,root,root)
151 %license COPYING
152 %{_libdir}/libasm.so.*
153 %{_libdir}/libasm-%{version}.so
154
155 %files -n libasm-devel
156 %defattr(-,root,root)
157 %{_libdir}/libasm.so
158 %{_libdir}/libasm.a
159 %dir %{_includedir}/elfutils
160 %{_includedir}/elfutils/libasm.h
161
162 %files -n libebl
163 %defattr(-,root,root)
164 %license COPYING
165 %{_libdir}/elfutils
166
167 %files -n libebl-devel
168 %defattr(-,root,root)
169 %{_libdir}/libebl.a
170 %dir %{_includedir}/elfutils
171 %{_includedir}/elfutils/libebl.h
172
173 %files -n libelf
174 %defattr(-,root,root)
175 %license COPYING
176 %{_libdir}/libelf.so.*
177 %{_libdir}/libelf-%{version}.so
178
179 %files -n libelf-devel
180 %defattr(-,root,root)
181 %{_libdir}/libelf.so
182 %{_libdir}/libelf.a
183 #%{_libdir}/libelf_pic.a
184 %{_includedir}/libelf.h
185 %{_includedir}/gelf.h
186 %{_includedir}/nlist.h
187 %dir %{_includedir}/elfutils
188 %{_includedir}/elfutils/elf-knowledge.h
189 %{_includedir}/elfutils/version.h
190
191 %files -n libdw
192 %defattr(-,root,root)
193 %license COPYING
194 %{_libdir}/libdw.so.*
195 %{_libdir}/libdw-%{version}.so
196
197 %files -n libdw-devel
198 %defattr(-,root,root)
199 %{_libdir}/libdw.a
200 %{_libdir}/libdw.so
201 %{_includedir}/dwarf.h
202 %dir %{_includedir}/elfutils
203 %{_includedir}/elfutils/libdw.h
204 %{_includedir}/elfutils/libdwfl.h
205
206 %changelog