nspr/nspr.spec

131 lines
3.7 KiB
RPMSpec
Raw Normal View History

2022-12-28 15:39:25 +08:00
%global nspr_version 4.35
2019-09-30 11:10:02 -04:00
Name: nspr
2022-12-28 15:39:25 +08:00
Version: 4.35.0
Release: 3
2019-09-30 11:10:02 -04:00
Summary: Netscape Portable Runtime
License: MPLv2.0
URL: http://www.mozilla.org/projects/nspr
BuildRequires: gcc
2021-11-29 17:00:58 +08:00
Source0: http://ftp.mozilla.org/pub/%{name}/releases/v%{nspr_version}/src/%{name}-%{nspr_version}.tar.gz
2019-09-30 11:10:02 -04:00
Source1: nspr-config.xml
2020-07-24 01:42:00 +00:00
Patch1: nspr-gcc-atomics.patch
2022-11-14 14:53:05 +08:00
2019-09-30 11:10:02 -04:00
%description
NetScape Portable Runtime (NSPR) provides platform independence for non-GUI
operating system facilities. These facilities include threads, thread
synchronization, normal file and network I/O, interval timing and calendar
time, basic memory management (malloc and free) and shared library linking.
%package devel
Summary: Development libraries for the Netscape Portable Runtime
BuildRequires: xmlto
Requires: nspr = %{version}-%{release}
Requires: pkgconfig
%description devel
Development package for nspr.
%prep
%autosetup -n %{name}-%{nspr_version} -p1
2019-09-30 11:10:02 -04:00
cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in
%build
%define _configure ./nspr/configure
%configure \
--includedir=%{_includedir}/nspr4 \
--enable-64bit \
--enable-optimize="$RPM_OPT_FLAGS" \
--disable-debug
2019-09-30 11:10:02 -04:00
%make_build
date +"%e %B %Y" | tr -d '\n' > date.xml
echo -n %{version} > version.xml
cp %{SOURCE1} .
xmlto man nspr-config.xml
%check
perl ./nspr/pr/tests/runtests.pl 2>&1 | tee output.log
TEST_FAILURES=`grep -c FAILED ./output.log` || :
if [ $TEST_FAILURES -ne 0 ]; then
echo "error: test suite returned failure(s)"
exit 1
fi
echo "test suite completed"
%install
rm -rf $RPM_BUILD_ROOT
%make_install
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
NSPR_LIBS=`./config/nspr-config --libs`
NSPR_CFLAGS=`./config/nspr-config --cflags`
NSPR_VERSION=`./config/nspr-config --version`
install -c -m 644 nspr-config.1 $RPM_BUILD_ROOT%{_mandir}/man1/nspr-config.1
2019-12-25 15:59:21 +08:00
%ldconfig_scriptlets
2019-09-30 11:10:02 -04:00
%files
%{_libdir}/libnspr4.so
%{_libdir}/libplc4.so
%{_libdir}/libplds4.so
%exclude %{_bindir}/compile-et.pl
%exclude %{_bindir}/prerr.properties
%exclude %{_libdir}/libnspr4.a
%exclude %{_libdir}/libplc4.a
%exclude %{_libdir}/libplds4.a
%exclude %{_datadir}/aclocal/nspr.m4
%exclude %{_includedir}/nspr4/md
%license nspr/LICENSE
%files devel
%{_bindir}/nspr-config
%{_libdir}/pkgconfig/nspr.pc
%{_includedir}/nspr4
%{_mandir}/man*/*
%changelog
* Tue Apr 23 2024 Liu Chao <liuchao173@huawei.com> - 4.35.0-3
- update nspr-4.35.tar.gz
* Fri Feb 24 2023 Wenyu Liu <liuwenyu7@huawei.com> - 4.35.0-2
- disable debug option
2022-12-28 15:39:25 +08:00
* Wed Dec 28 2022 Wenyu Liu <liuwenyu7@huawei.com> - 4.35.0-1
- update to 4.35.0
2022-11-14 14:53:05 +08:00
* Mon Nov 14 2022 zhaozhen <zhaozhen@loongson.cn> - 4.32.0-2
- Support loongarch64
2021-11-29 17:00:58 +08:00
* Mon Nov 29 2021 zhouwenpei <zhouwenpei1@huawei.com> - 4.32.0-1
- update to 4.32.0
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 4.29.0-2
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
2021-02-01 11:18:38 +08:00
* Mon Feb 1 2021 xinghe <xinghe1@huawei.com> - 4.29.0-1
- update to 4.29.0
* Fri Sep 4 2020 shixuantong <shixuantong@huawei.com> - 4.26.0-3
- update Source0 and change tar package name
2020-07-30 10:28:39 +08:00
* Thu Jul 30 2020 jinzhimin<jinzhimin2@huawei.com> - 4.26.0-2
- fix build failed
2020-07-24 01:42:00 +00:00
* Fri Jul 17 2020 jinzhimin <jinzhimin2@huawei.com> - 4.26.0-1
- upgrade to 4.26.0
* Wed Jan 8 2020 hewenliang <hewenliang4@huawei.com> - 4.20.0-4
- Remove unecessary patches.
2019-12-25 15:59:21 +08:00
* Fri Dec 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.20.0-3
- Fix ldconfig scriptlets
2019-09-30 11:10:02 -04:00
* Fri Apr 19 2019 liusirui<liusirui@huawei.com> - 4.20.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:backport patches from https://hg.mozilla.org/projects/nspr
* Mon Sep 10 2018 openEuler Buildteam <buildteam@openeuler.org> - 4.20.0-1
- Package init