]> git.pld-linux.org Git - packages/crossguid.git/blob - crossguid.spec
0.2.2 branch note
[packages/crossguid.git] / crossguid.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define rel 1
6 %define short_commit 8f399e8
7 %define commit_date 20150803
8 Summary:        Lightweight cross platform C++ GUID/UUID library
9 Name:           crossguid
10 # 0.2.2 is being prepated on "dev-0.2" branch
11 Version:        0
12 Release:        0.%{rel}.%{commit_date}
13 License:        MIT
14 Group:          Libraries
15 Source0:        https://github.com/graeme-hill/crossguid/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz
16 # Source0-md5:  696a6573286d6fdbfde18686aa9f6489
17 URL:            https://github.com/graeme-hill/crossguid/
18 Source1:        Makefile
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  libuuid-devel
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 CrossGuid is a minimal, cross platform, C++ GUID library. It uses the
25 best native GUID/UUID generator on the given platform and has a
26 generic class for parsing, stringifying, and comparing IDs.
27
28 %package devel
29 Summary:        Development files for %{name}
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32
33 %description devel
34 The %{name}-devel package contains libraries and header files for
35 developing applications that use %{name}.
36
37 %prep
38 %setup -qc
39 mv %{name}-*/* .
40
41 cp -p %{SOURCE1} Makefile
42
43 %build
44 %{__make} \
45         CXX="%{__cxx}" \
46         LDFLAGS="%{rpmldflags}" \
47         CXXFLAGS="%{rpmcxxflags}"
48
49 %if %{with tests}
50 %{__make} test \
51         CXX="%{__cxx}" \
52         LDFLAGS="%{rpmldflags}" \
53         CXXFLAGS="%{rpmcxxflags}"
54 ./test
55 %endif
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 %{__make} install \
60         LIBDIR=%{_libdir} \
61         INCLUDEDIR=%{_includedir} \
62         DESTDIR=$RPM_BUILD_ROOT
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post   -p /sbin/ldconfig
68 %postun -p /sbin/ldconfig
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README.md LICENSE
73 %attr(755,root,root) %{_libdir}/libcrossguid.so.*.*.*
74 %ghost %{_libdir}/libcrossguid.so.0
75
76 %files devel
77 %defattr(644,root,root,755)
78 %{_includedir}/guid.h
79 %{_libdir}/libcrossguid.so
This page took 0.075218 seconds and 4 git commands to generate.