c38143202694feff5f6f2814968974fe20e4cda4
[platform/upstream/libpng.git] / packaging / libpng.spec
1 Name:           libpng
2 Version:        1.6.37
3 Release:        1
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 BuildRequires:  zlib-devel
11
12 %description
13 The libpng package contains a library of functions for creating and
14 manipulating PNG (Portable Network Graphics) image format files.  PNG
15 is a bit-mapped graphics format similar to the GIF format.  PNG was
16 created to replace the GIF format, since GIF uses a patented data
17 compression algorithm.
18
19 Libpng should be installed if you need to manipulate PNG format image
20 files.
21
22 %package devel
23 Summary:        Development tools for programs to manipulate PNG image format files
24 Group:          Development/Libraries
25 Requires:       %{name} = %{version}-%{release}
26 Requires:       zlib-devel
27
28 %description devel
29 The libpng-devel package contains header files and documentation necessary
30 for developing programs using the PNG (Portable Network Graphics) library.
31
32 %prep
33 %setup -q
34 cp %{SOURCE1001} .
35
36 %build
37 %ifarch %{arm}
38 CFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
39 %endif
40
41 %configure \
42     --disable-static \
43 %ifarch %arm armv7l armv7el aarch64
44     --enable-arm-neon=check \
45     %{?ubsan: --enable-arm-neon=no}
46 %endif
47
48
49 %__make %{?_smp_mflags}
50
51 %install
52 %make_install
53 rm -rf %{buildroot}/usr/share/man
54
55 %post -p /sbin/ldconfig
56 %postun -p /sbin/ldconfig
57
58 %files
59 %manifest %{name}.manifest
60 %license LICENSE
61 %{_libdir}/libpng*.so.*
62
63 %files devel
64 %manifest %{name}.manifest
65 %{_bindir}/*
66 %{_includedir}/*
67 %{_libdir}/libpng*.so
68 %{_libdir}/pkgconfig/*
69