aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/rpm/embedlog.spec.template
blob: 6066bbac08d81b56fff090f1922ec13339e5e789 (plain)
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
Name:           embedlog
Version:        @{VERSION}
Release:        1
Summary:        highly portable c89 complaint logger

Group:          System Environment/Libraries
License:        BSD
URL:            https://embedlog.bofc.pl
Source0:        https://git.bofc.pl/embedlog/snapshot/embedlog-%{version}.tar.gz
Vendor:         Bits of Code
Packager:       Michał Łyszczek <michal.lyszczek@bofc.pl>

BuildRequires:  automake autoconf libtool

%description
embedlog is a highly portable c89 complaint logger (with
additional features for users with c99 compilers and/or POSIX systems).
This library is designed mainly for embedded devices, but can also be
used in high level OSes like Linux.

%package devel
Summary:        embedlog development package
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
embedlog development package containing headers and manuals

%prep
%setup -q -n embedlog-@{GIT_VERSION}

# debug packge macro, it is commented by default as rhel and centos
# automatically build debug package, but open suse does not. Change it to
# "@debug_package" (just change that @ to percent %% character)
# when debug symbols are not automatically installed

# __DEBUG_PACKAGE__

%build
./autogen.sh
%configure
make %{?_smp_mflags}

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

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

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE readme.md
%{_libdir}/libembedlog.so.@{ABI_VERSION}
%{_libdir}/libembedlog.so.@{LIB_VERSION}

%files devel
%defattr(-,root,root,-)
%{_includedir}/embedlog.h
%{_libdir}/libembedlog.so
%{_libdir}/libembedlog.a
%{_libdir}/libembedlog.la
%{_mandir}/*/*

%changelog