]> git.pld-linux.org Git - packages/dotnet-newtonsoft-json.git/blob - dotnet-newtonsoft-json.spec
- new
[packages/dotnet-newtonsoft-json.git] / dotnet-newtonsoft-json.spec
1 %include        /usr/lib/rpm/macros.mono
2 Summary:        Json.NET - a popular high-performance JSON framework for .NET
3 Summary(pl.UTF-8):      Json.NET - popularny, wydajny szkielet JSON dla .NET
4 Name:           dotnet-newtonsoft-json
5 Version:        6.0.1
6 Release:        1
7 License:        MIT
8 Group:          Libraries
9 Source0:        https://github.com/JamesNK/Newtonsoft.Json/archive/%{version}/Newtonsoft.Json-%{version}.tar.gz
10 # Source0-md5:  e341df12a672379713e9c200ed708860
11 Source1:        newtonsoft-json.pc.in
12 Source2:        Newtonsoft.Json.source
13 URL:            http://james.newtonking.com/json
14 BuildRequires:  mono-csharp
15 # xbuild
16 BuildRequires:  mono-devel
17 BuildRequires:  mono-monodoc
18 BuildRequires:  rpmbuild(monoautodeps)
19 Requires:       mono
20 ExclusiveArch:  %{ix86} %{x8664} arm ia64 ppc s390 s390x sparc sparcv9 sparc64
21 ExcludeArch:    i386
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _spkgconfigdir  %{_prefix}/lib/pkgconfig
25
26 %description
27 Json.NET is a popular high-performance JSON framework for .NET.
28 Features:
29 - Flexible JSON serializer for converting between .NET objects and
30   JSON
31 - LINQ to JSON for manually reading and writing JSON
32 - High performance, faster than .NET's built-in JSON serializers
33 - Write indented, easy to read JSON
34 - Convert JSON to and from XML
35 - Supports .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone and
36   Windows 8.
37
38 %description -l pl.UTF-8
39 Json.NET to popularny, wydajny szkielet JSON dla .NET. Cechują go:
40 - elastyczna serializacja JSON do konwersji między obiektami .NET i
41   JSON
42 - LINQ do JSON do ręcznego odczytu i zapisu formatu JSON
43 - wydajna, szybsza niż wbudowana w .NET serializacja JSON
44 - zapis czytelnego, zawierającego wcięcia formatu JSON
45 - konwersja JSON do i z XML
46 - obsługa .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone oraz
47   Windows 8.
48
49 %package devel
50 Summary:        Development files for Json.NET library
51 Summary(pl.UTF-8):      Pliki programistyczne biblioteki Json.NET
52 Group:          Development/Libraries
53 Requires:       %{name} = %{version}-%{release}
54
55 %description devel
56 Development files for Json.NET library.
57
58 %description devel -l pl.UTF-8
59 Pliki programistyczne biblioteki Json.NET.
60
61 %prep
62 %setup -q -n Newtonsoft.Json-%{version}
63
64 %build
65 # rules taken from Debian packaging
66 xbuild Src/Newtonsoft.Json/Newtonsoft.Json.Net40.csproj \
67         /property:SignAssembly=true \
68         /property:AssemblyOriginatorKeyFile=Dynamic.snk \
69         /property:Configuration=Release \
70         /property:DefineConstants='SIGNED NET40 TRACE'
71 mdoc update \
72         -o monodoc \
73         -i Src/Newtonsoft.Json/bin/Release/Net40/Newtonsoft.Json.xml \
74         Src/Newtonsoft.Json/bin/Release/Net40/Newtonsoft.Json.dll
75 mdoc assemble \
76         --format ecma \
77         --out Newtonsoft.Json \
78         monodoc
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_spkgconfigdir},%{_prefix}/lib/monodoc/sources}
83
84 gacutil -f -i Src/Newtonsoft.Json/bin/Release/Net40/Newtonsoft.Json.dll \
85         /package Newtonsoft.Json-6.0 \
86         /gacdir $RPM_BUILD_ROOT%{_prefix}/lib
87
88 cp -p Newtonsoft.Json.{zip,tree} %{SOURCE2} $RPM_BUILD_ROOT%{_prefix}/lib/monodoc/sources
89
90 %{__sed} -e 's,@prefix@,%{_prefix},' \
91         -e 's,@VERSION@,%{version},' \
92         -e 's,@MAJOR@,6.0,' \
93         %{SOURCE1} > $RPM_BUILD_ROOT%{_spkgconfigdir}/newtonsoft-json.pc
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %files
99 %defattr(644,root,root,755)
100 %doc LICENSE.md Doc/readme.txt
101 %{_prefix}/lib/mono/gac/Newtonsoft.Json
102
103 %files devel
104 %defattr(644,root,root,755)
105 %{_prefix}/lib/mono/Newtonsoft.Json-6.0
106 %{_prefix}/lib/monodoc/sources/Newtonsoft.Json.*
107 %{_spkgconfigdir}/newtonsoft-json.pc
This page took 0.072213 seconds and 3 git commands to generate.