]> git.pld-linux.org Git - projects/template-specs.git/blame - lib.spec
filterout_cxx example
[projects/template-specs.git] / lib.spec
CommitLineData
3cb1cd3d 1#
66df3cad
ER
2# Conditional build:
3%bcond_without apidocs # do not build and package API docs
aed9d573 4%bcond_without static_libs # don't build static libraries
66df3cad 5#
f9986cd5 6Summary: -
ce39d734 7Summary(pl.UTF-8): -
3f8f5e5b
ER
8Name: ---
9Version: 0.1
10Release: 0.1
f9986cd5
JB
11License: - (enter GPL/LGPL/BSD/BSD-like/other license name here)
12Group: Libraries
13Source0: %{name}-%{version}.tar.gz
14# Source0-md5: -
3f8f5e5b
ER
15#Patch0: %{name}-what.patch
16#URL: -
17#BuildRequires: -
c53387e8
ER
18#BuildRequires: autoconf
19#BuildRequires: automake
20#BuildRequires: intltool
21#BuildRequires: libtool
3f8f5e5b
ER
22#Requires(postun): -
23#Requires(pre,post): -
24#Requires(preun): -
25#Requires: -
26#Provides: -
27#Obsoletes: -
28#Conflicts: -
f9986cd5
JB
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
a1a32384
ER
31# do not keep them in newly created specs
32# these are only here to help fixing quickly broken specs
33%define filterout_ld -Wl,--no-copy-dt-needed-entries
34%define filterout_ld -Wl,--as-needed
31c122e0
ER
35# do not commit spec containing this (use for local testing only):
36%define filterout_c -Werror=format-security
877721ed 37%define filterout_cxx -Werror=format-security
a1a32384 38
20667fb2 39# Ignore file in __spec_install_post_check_so
5346ce74 40BuildRequires: rpmbuild(macros) >= 1.583
e24df1c5 41%define skip_post_check_so libunresolved.so.*
20667fb2 42
f9986cd5
JB
43%description
44
3f8f5e5b 45#%description -l pl.UTF-8
f9986cd5 46
41119926 47%package common
ca8abdb7
TP
48Summary: Common files for %{name} library
49Summary(pl.UTF-8): Wspólne pliki biblioteki %{name}
41119926
TP
50Group: Libraries
51Requires: %{name} = %{version}-%{release}
52
53%description common
ca8abdb7 54Common files for %{name} library.
41119926
TP
55
56%description common -l pl.UTF-8
ca8abdb7 57Wspólne pliki biblioteki %{name}.
41119926 58
f9986cd5 59%package devel
ca8abdb7
TP
60Summary: Header files for %{name} library
61Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
f9986cd5 62Group: Development/Libraries
d7dd7729 63Requires: %{name} = %{version}-%{release}
f9986cd5
JB
64
65%description devel
ca8abdb7 66Header files for %{name} library.
f9986cd5 67
9be49f18 68%description devel -l pl.UTF-8
ca8abdb7 69Pliki nagłówkowe biblioteki %{name}.
f9986cd5
JB
70
71%package static
ca8abdb7
TP
72Summary: Static %{name} library
73Summary(pl.UTF-8): Statyczna biblioteka %{name}
f9986cd5 74Group: Development/Libraries
d7dd7729 75Requires: %{name}-devel = %{version}-%{release}
f9986cd5
JB
76
77%description static
ca8abdb7 78Static %{name} library.
f9986cd5 79
9be49f18 80%description static -l pl.UTF-8
ca8abdb7 81Statyczna biblioteka %{name}.
f9986cd5 82
66df3cad 83%package apidocs
ca8abdb7
TP
84Summary: %{name} API documentation
85Summary(pl.UTF-8): Dokumentacja API biblioteki %{name}
66df3cad
ER
86Group: Documentation
87
88%description apidocs
e077345b 89API documentation for %{name} library.
66df3cad 90
3cb1cd3d 91%description apidocs -l pl.UTF-8
ca8abdb7 92Dokumentacja API biblioteki %{name}.
3cb1cd3d 93
f9986cd5
JB
94%prep
95%setup -q
1c854c4b 96#%patch0 -p1
f9986cd5
JB
97
98%build
c42a30cf
JB
99# if ac/am/lt/* rebuilding is necessary, do it in this order and add
100# appropriate BuildRequires
101#%{__libtoolize}
102#%{__aclocal}
103#%{__autoconf}
104#%{__autoheader}
105#%{__automake}
f6de6810
ER
106%configure \
107 %{!?with_static_libs:--disable-static}
f9986cd5
JB
108%{__make}
109
110%install
111rm -rf $RPM_BUILD_ROOT
112# create directories if necessary
113#install -d $RPM_BUILD_ROOT
114
115%{__make} install \
116 DESTDIR=$RPM_BUILD_ROOT
117
14750145
JB
118# if library provides pkgconfig file containing proper {Requires,Libs}.private
119# then remove .la pollution
4b532792
JR
120#%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
121
f9986cd5
JB
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125%post -p /sbin/ldconfig
126%postun -p /sbin/ldconfig
127
128%files
129%defattr(644,root,root,755)
41119926
TP
130%doc AUTHORS CREDITS README THANKS
131%attr(755,root,root) %{_libdir}/%{name}.so.*.*.*
132%attr(755,root,root) %ghost %{_libdir}/%{name}.so.N
133
134%files common
135%defattr(644,root,root,755)
136%attr(755,root,root) %{_bindir}/%{name}*
f9986cd5
JB
137%{_datadir}/%{name}
138
139%files devel
140%defattr(644,root,root,755)
41119926
TP
141%doc devel-doc/* ChangeLog NEWS TODO
142%attr(755,root,root) %{_libdir}/%{name}.so
14750145
JB
143# if no pkgconfig support, or it misses .private deps, then include .la file
144#%{_libdir}/libFOO.la
41119926
TP
145%{_includedir}/%{name}
146%{_aclocaldir}/%{name}.m4
147%{_pkgconfigdir}/%{name}.pc
f9986cd5 148
f6de6810 149%if %{with static_libs}
f9986cd5
JB
150%files static
151%defattr(644,root,root,755)
41119926 152%{_libdir}/%{name}.a
f6de6810 153%endif
66df3cad 154
a5f7d790 155%if %{with apidocs}
66df3cad
ER
156%files apidocs
157%defattr(644,root,root,755)
158%doc apidocs/*
a5f7d790 159%endif
This page took 0.149168 seconds and 4 git commands to generate.