Use cmake instead of configure
[platform/upstream/libpng.git] / packaging / libpng.spec
1 Name:           libpng
2 Version:        1.6.37
3 Release:        3
4 License:        Libpng
5 Summary:        A library of functions for manipulating PNG image format files
6 Url:            http://www.libpng.org/pub/png/libpng.html
7 Group:          System/Libraries
8 Source:         %{name}-%{version}.tar.bz2
9 Source1001:     libpng.manifest
10
11 BuildRequires:  cmake
12 BuildRequires:  zlib-devel
13
14 %description
15 The libpng package contains a library of functions for creating and
16 manipulating PNG (Portable Network Graphics) image format files.  PNG
17 is a bit-mapped graphics format similar to the GIF format.  PNG was
18 created to replace the GIF format, since GIF uses a patented data
19 compression algorithm.
20
21 Libpng should be installed if you need to manipulate PNG format image
22 files.
23
24 %package devel
25 Summary:        Development tools for programs to manipulate PNG image format files
26 Group:          Development/Libraries
27 Requires:       %{name} = %{version}-%{release}
28 Requires:       zlib-devel
29
30 %description devel
31 The libpng-devel package contains header files and documentation necessary
32 for developing programs using the PNG (Portable Network Graphics) library.
33
34 %prep
35 %setup -q
36 cp %{SOURCE1001} .
37
38 %build
39 %ifarch %{arm}
40 CFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
41 %endif
42
43 %cmake . -DPNG_STATIC=OFF \
44          -DSKIP_INSTALL_PROGRAMS=ON \
45          -DSKIP_INSTALL_EXPORT=ON \
46 %ifarch %{arm}
47          -DPNG_ARM_NEON=check \
48 %else
49          -DPNG_ARM_NEON=off \
50 %endif
51          %{?ubsan: -DPNG_ARM_NEON=off}
52
53 make %{?jobs:-j%jobs}
54
55 %install
56 %make_install
57 rm -rf %{buildroot}/usr/share/man
58
59 %post -p /sbin/ldconfig
60 %postun -p /sbin/ldconfig
61
62 %files
63 %manifest %{name}.manifest
64 %license LICENSE
65 %{_libdir}/libpng*.so.*
66
67 %files devel
68 %manifest %{name}.manifest
69 %{_bindir}/*
70 %{_includedir}/*
71 %{_libdir}/libpng*.so
72 %{_libdir}/pkgconfig/*
73