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