Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates-src > by-pkgid > 1a420f9b538ee57300079368b10a1298 > files > 5

nspr-4.13.1-1.mga5.src.rpm

%define major_nspr 4
%define epoch_nspr 2
%define libname %mklibname nspr %{major_nspr}
%define develname %mklibname nspr -d
%define version 4.13.1
%define rel 1

%define patchver %(echo %{version}|cut -d. -f3)
%if 0%{patchver}
%define tarballver %{version}
%else
%define tarballver %(echo %{version}|cut -d. -f1,2)
%endif

Summary:	Netscape Portable Runtime
Name:		nspr
Epoch:		%{epoch_nspr}
Version:	%{version}
Release:	%mkrel %rel
License:	MPLv1.1 or GPLv2+ or LGPLv2+
Group:		System/Libraries
URL:		http://www.mozilla.org/projects/nspr/
Source0:	http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v%{tarballver}/src/%{name}-%{tarballver}.tar.gz
Source1:	nspr.pc.in
Source2:	nspr-config-vars.in
Patch1:		nspr-config-pc.patch
BuildRequires:	autoconf

%description
Virtual package, not built.

%package -n %{libname}
Summary:	Netscape Portable Runtime
Group:		System/Libraries
Requires(pre):	filesystem >= 2.1.9-18
Obsoletes:	mozilla-nspr
Provides:	nspr = %{epoch_nspr}:%{version}-%{release}
Provides:	mozilla-nspr = %{epoch_nspr}:%{version}-%{release}
Conflicts:	%{_lib}nspr-devel < 2:4.9.1-2

%description -n %{libname}
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 -n %{develname}
Summary:	Development libraries for the Netscape Portable Runtime
Group:		Development/C++
Requires(pre):	filesystem >= 2.1.9-18
Requires:	%{libname} = %{epoch_nspr}:%{version}-%{release}
Obsoletes:	mozilla-nspr-devel
Obsoletes:	nspr-devel
Obsoletes:	%{libname}-devel
Provides:	nspr-devel = %{epoch_nspr}:%{version}-%{release}
Provides:	libnspr-devel = %{epoch_nspr}:%{version}-%{release}
# (cg) The -devel package doesn't generate these automatically.
%ifarch x86_64
Provides: devel(libnspr4(64bit))
Provides: devel(libplc4(64bit))
Provides: devel(libplds4(64bit))
%else
Provides: devel(libnspr4)
Provides: devel(libplc4)
Provides: devel(libplds4)
%endif
Conflicts:	%{libname} < 2:4.7.3-3

%description -n %{develname}
Header files for doing development with the Netscape Portable Runtime.

%prep
%setup -q -n %{name}-%{tarballver}

# Original nspr-config is not suitable for our distribution,
# because on different platforms it contains different dynamic content.
# Therefore we produce an adjusted copy of nspr-config that will be 
# identical on all platforms.
# However, we need to use original nspr-config to produce some variables
# that go into nspr.pc for pkg-config.

cp ./nspr/config/nspr-config.in ./nspr/config/nspr-config-pc.in
%patch1 -p1

cp %{SOURCE2} ./nspr/config/

%build
pushd nspr
autoconf
popd

%setup_compile_flags

# (tpg) don't use macro here
./nspr/configure \
	--build=%{_target_platform} \
	--host=%{_host} \
	--target=%{_target_platform} \
	--prefix=%{_prefix} \
	--libdir=%{_libdir} \
	--includedir=%{_includedir}/nspr4 \
%ifarch x86_64 ppc64 ia64 s390x sparc64
	--enable-64bit \
%endif
	--enable-optimize="-O2" \
	--disable-debug \
	--enable-ipv6 \
	--with-pthreads \
	--with-mozilla

%make

%install
%makeinstall_std 

NSPR_LIBS=`./config/nspr-config --libs`
NSPR_CFLAGS=`./config/nspr-config --cflags`
%{__mkdir_p} %{buildroot}/%{_libdir}/pkgconfig

cat ./config/nspr-config-vars > \
                     %{buildroot}/%{_libdir}/pkgconfig/nspr.pc

cat %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \
                     -e "s,%%prefix%%,%{_prefix},g" \
                     -e "s,%%exec_prefix%%,%{_prefix},g" \
                     -e "s,%%includedir%%,%{_includedir}/nspr4,g" \
                     -e "s,%%NSPR_VERSION%%,%{version},g" \
                     -e "s,%%FULL_NSPR_LIBS%%,$NSPR_LIBS,g" \
                     -e "s,%%FULL_NSPR_CFLAGS%%,$NSPR_CFLAGS,g" >> \
                     %{buildroot}/%{_libdir}/pkgconfig/nspr.pc

%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}/%{_lib}
install -m755 -D ./config/nspr-config-pc %{buildroot}/%{_bindir}/nspr-config

# Get rid of the things we don't want installed (per upstream)
%{__rm} -rf \
   %{buildroot}%{_bindir}/compile-et.pl \
   %{buildroot}%{_bindir}/prerr.properties \
   %{buildroot}%{_libdir}/libnspr4.a \
   %{buildroot}%{_libdir}/libplc4.a \
   %{buildroot}%{_libdir}/libplds4.a \
   %{buildroot}%{_datadir}/aclocal/nspr.m4 \
   %{buildroot}%{_includedir}/nspr4/md

%files -n %{libname}
%{_libdir}/libnspr4.so
%{_libdir}/libplc4.so
%{_libdir}/libplds4.so

%files -n %{develname}
%{_includedir}/nspr4
%{_libdir}/pkgconfig/nspr.pc
%{_bindir}/nspr-config


%changelog
* Wed Oct 26 2016 luigiwalser <luigiwalser> 2:4.13.1-1.mga5
+ Revision: 1063597
- 4.13.1
- 4.13
- 4.12
- 4.11
- 4.10.10
- 4.10.9

* Tue Jan 27 2015 luigiwalser <luigiwalser> 2:4.10.8-1.mga5
+ Revision: 812472
- 4.10.8

* Wed Oct 15 2014 umeabot <umeabot> 2:4.10.7-3.mga5
+ Revision: 739058
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 2:4.10.7-2.mga5
+ Revision: 682938
- Mageia 5 Mass Rebuild

* Tue Aug 19 2014 luigiwalser <luigiwalser> 2:4.10.7-1.mga5
+ Revision: 665767
- 4.10.7

* Tue Jun 10 2014 fwang <fwang> 2:4.10.6-1.mga5
+ Revision: 635336
- 4.10.6

* Thu May 08 2014 oden <oden> 2:4.10.5-1.mga5
+ Revision: 621145
- eureka!
- 4.10.5

* Tue Mar 18 2014 luigiwalser <luigiwalser> 2:4.10.4-1.mga5
+ Revision: 605070
- 4.10.4

* Tue Feb 04 2014 luigiwalser <luigiwalser> 2:4.10.3-1.mga5
+ Revision: 582642
- 4.10.3

* Fri Nov 15 2013 luigiwalser <luigiwalser> 2:4.10.2-1.mga4
+ Revision: 551462
- 4.10.2

* Mon Oct 21 2013 umeabot <umeabot> 2:4.10.1-2.mga4
+ Revision: 538051
- Mageia 4 Mass Rebuild

  + fwang <fwang>
    - cleanup spec

* Sat Sep 28 2013 luigiwalser <luigiwalser> 2:4.10.1-1.mga4
+ Revision: 488396
- 4.10.1

* Thu Jun 27 2013 fwang <fwang> 2:4.10.0-2.mga4
+ Revision: 447360
- finally fix simplified nspr version

* Wed Jun 26 2013 oden <oden> 2:4.10-1.mga4
+ Revision: 446826
- 4.10
- adjust the patches

* Mon Apr 01 2013 luigiwalser <luigiwalser> 2:4.9.6-1.mga3
+ Revision: 406910
- 4.9.6

* Wed Feb 06 2013 luigiwalser <luigiwalser> 2:4.9.5-1.mga3
+ Revision: 394928
- 4.9.5

* Sat Jan 12 2013 umeabot <umeabot> 2:4.9.4-4.mga3
+ Revision: 361060
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Dec 10 2012 luigiwalser <luigiwalser> 2:4.9.4-3.mga3
+ Revision: 329379
- fix patch version fix to actually work again

* Mon Dec 10 2012 blino <blino> 2:4.9.4-2.mga3
+ Revision: 329365
- remove the MOD_PATCH_VERSION workaround, it is not working as expected
  (export is not propagated to build step) and generates an incorrect
  patch_version in nspr-config; this is breaking thunderbird-lightning
  configure script

* Mon Nov 26 2012 tv <tv> 2:4.9.4-1.mga3
+ Revision: 321988
- new release

  + luigiwalser <luigiwalser>
    - revert incorrect change

* Tue Oct 30 2012 fwang <fwang> 2:4.9.3-2.mga3
+ Revision: 311568
- version does not need promoted

* Sat Oct 27 2012 luigiwalser <luigiwalser> 2:4.9.3-1.mga3
+ Revision: 310758
- 4.9.3

* Sun Aug 26 2012 luigiwalser <luigiwalser> 2:4.9.2-1.mga3
+ Revision: 284175
- 4.9.2

* Tue Jul 24 2012 fwang <fwang> 2:4.9.1-3.mga3
+ Revision: 274024
- add conflicts to ease upgrading

* Sat Jul 21 2012 colin <colin> 2:4.9.1-2.mga3
+ Revision: 273158
- Update for usrmove

* Tue Jun 05 2012 luigiwalser <luigiwalser> 2:4.9.1-1.mga3
+ Revision: 255991
- 4.9.1
- update patch 1 (from mdv)

* Sun Apr 22 2012 luigiwalser <luigiwalser> 2:4.9.0-5.mga2
+ Revision: 232563
- match package version with upstream pkg-config version (4.9.0)

* Tue Apr 17 2012 luigiwalser <luigiwalser> 2:4.9-4.mga2
+ Revision: 231221
- fix nspr-config version

* Sun Feb 26 2012 luigiwalser <luigiwalser> 2:4.9-3.mga2
+ Revision: 215061
- fix pkg-config version

* Tue Feb 21 2012 fwang <fwang> 2:4.9-2.mga2
+ Revision: 211509
- new version 4.9
- rebuild for higher release tag than stable 1
- new version 4.8.9

* Thu Jun 16 2011 tv <tv> 2:4.8.8-1.mga2
+ Revision: 108403
- drop patch 2 (merged)
- new release
- new release

* Tue Apr 26 2011 rtp <rtp> 2:4.8.7-1.mga1
+ Revision: 91657
- fix build (nspr autoconf files are working with autoconf 2.1 not 2.5)
- add patch from Debian to get proper cflags while waiting upstream fix

  + tv <tv>
    - fix autoconf call
    - fix perm
    - we are actually shipping final version

* Sat Jan 15 2011 blino <blino> 2:4.8.7-0.beta2.1.mga1
+ Revision: 19052
- remove old mkrel checks
- remove old ldconfig scriptlets and conditionals
- imported package nspr