source: spec/trunk/SPECS/libidn.spec@ 1330

Last change on this file since 1330 was 900, checked in by Silvan Scherrer, 9 years ago

spec: libidn: Release version 1.33-2.

File size: 5.0 KB
Line 
1#define svn_url e:/trees/libidn/trunk
2%define svn_url http://svn.netlabs.org/repos/ports/libidn/trunk
3%define svn_rev 1828
4
5# set this to 1 to enable
6%global with_java 0
7%global with_emacs 0
8
9Summary: Internationalized Domain Name support library
10Name: libidn
11Version: 1.33
12Release: 2%{?dist}
13URL: http://www.gnu.org/software/libidn/
14License: LGPLv2+ and GPLv3+ and GFDL
15
16Vendor: bww bitwise works GmbH
17Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
18
19Group: System Environment/Libraries
20BuildRequires: pkgconfig gettext
21#BuildRequires: emacs
22#Requires(post): /sbin/install-info /sbin/ldconfig
23#Requires(preun): /sbin/install-info
24#Requires(postun): /sbin/ldconfig
25Requires: libcx >= 0.4
26
27%if 0%{?with_emacs}
28# emacs-libidn merged with main package in 1.30-4
29Obsoletes: emacs-libidn < 1.30-4
30Provides: emacs-libidn < 1.30-4
31Requires: emacs-filesystem >= %{_emacs_version}
32%endif
33
34%description
35GNU Libidn is an implementation of the Stringprep, Punycode and
36IDNA specifications defined by the IETF Internationalized Domain
37Names (IDN) working group, used for internationalized domain
38names.
39
40%package devel
41Summary: Development files for the libidn library
42Group: Development/Libraries
43Requires: %{name}%{?_isa} = %{version}-%{release}
44Requires: pkgconfig
45
46%description devel
47This package includes header files and libraries necessary for
48developing programs which use the GNU libidn library.
49
50%if 0%{?with_java}
51%package java
52Summary: Java port of the GNU Libidn library
53BuildRequires: java-devel
54BuildRequires: javapackages-local
55BuildRequires: mvn(com.google.code.findbugs:annotations)
56BuildRequires: mvn(com.google.guava:guava)
57BuildRequires: mvn(junit:junit)
58BuildArch: noarch
59
60%description java
61GNU Libidn is a fully documented implementation of the Stringprep,
62Punycode and IDNA specifications. Libidn's purpose is to encode
63and decode internationalized domain names.
64
65This package contains the native Java port of the library.
66
67%package javadoc
68Summary: Javadoc for %{name}-java
69BuildArch: noarch
70
71%description javadoc
72This package contains javadoc for %{name}-java.
73%endif
74
75
76%debug_package
77
78
79%prep
80%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
81%setup -q
82%else
83%setup -n "%{name}-%{version}" -Tc
84svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
85rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
86(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
87%endif
88
89autoreconf -fvi
90
91# Cleanup
92find . -name '*.jar' -print -delete
93find . -name '*.class' -print -delete
94
95
96%build
97export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
98export LIBS="-lcx"
99export VENDOR="%{vendor}"
100#--with-lispdir=%{_emacs_sitelispdir}/%{name} --enable-java
101%configure --disable-csharp --disable-static
102
103make %{?_smp_mflags}
104
105%check
106# without RPATH this needs to be set to test the compiled library
107#export LD_LIBRARY_PATH=$(pwd)/lib/.libs
108#make %{?_smp_mflags} -C tests check VALGRIND=env
109
110%install
111# libidn_jardir=%{_javadir}
112make install DESTDIR=$RPM_BUILD_ROOT pkgconfigdir=%{_libdir}/pkgconfig
113
114# provide more examples
115make %{?_smp_mflags} -C examples distclean
116
117# clean up docs
118find doc -name "Makefile*" | xargs rm
119rm -rf $RPM_BUILD_ROOT%{_datadir}/info/dir
120
121rm -rf $RPM_BUILD_ROOT%{_datadir}/emacs
122
123rm -f $RPM_BUILD_ROOT%{_libdir}/*.la \
124 $RPM_BUILD_ROOT%{_datadir}/info/*.png
125
126#{_emacs_bytecompile} $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}/*.el
127
128# regenerate java documentation
129rm -rf doc/java/*
130%if 0%{?with_java}
131%javadoc -source 1.6 -d doc/java $(find java/src/main/java -name "*.java")
132# generate maven depmap
133rm -rf $RPM_BUILD_ROOT%{_javadir}/libidn*.jar
134%mvn_artifact java/pom.xml java/libidn-%{version}.jar
135%mvn_file org.gnu.inet:libidn libidn
136%mvn_install -J doc/java
137%endif
138
139%find_lang %{name}
140
141%post
142#/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir
143#/sbin/ldconfig
144
145%preun
146#if [ $1 = 0 ]; then
147# /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
148#fi
149
150#%postun -p /sbin/ldconfig
151
152%files -f %{name}.lang
153%{!?_licensedir:%global license %%doc}
154%license COPYING*
155%doc AUTHORS NEWS FAQ README THANKS
156%{_bindir}/idn.exe
157%{_mandir}/man1/idn.1*
158%{_libdir}/idn*.dll
159%{_infodir}/%{name}.info
160
161%if 0%{?with_emacs}
162%{_emacs_sitelispdir}/%{name}
163%endif
164
165%files devel
166%doc doc/libidn.html examples
167%{_libdir}/idn*_dll.a
168%{_includedir}/*.h
169%{_libdir}/pkgconfig/*.pc
170%{_mandir}/man3/*
171
172%if 0%{?with_java}
173%files java -f .mfiles
174%license COPYING* java/LICENSE-2.0.txt
175
176%files javadoc -f .mfiles-javadoc
177%license COPYING* java/LICENSE-2.0.txt
178%endif
179
180%changelog
181* Thu Nov 24 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.33-2
182- libcx req is 0.4 and not 0.4.0
183
184* Tue Nov 15 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 1.33-1
185- first version
Note: See TracBrowser for help on using the repository browser.