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 |
|
---|
9 | Summary: Internationalized Domain Name support library
|
---|
10 | Name: libidn
|
---|
11 | Version: 1.33
|
---|
12 | Release: 2%{?dist}
|
---|
13 | URL: http://www.gnu.org/software/libidn/
|
---|
14 | License: LGPLv2+ and GPLv3+ and GFDL
|
---|
15 |
|
---|
16 | Vendor: bww bitwise works GmbH
|
---|
17 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
---|
18 |
|
---|
19 | Group: System Environment/Libraries
|
---|
20 | BuildRequires: pkgconfig gettext
|
---|
21 | #BuildRequires: emacs
|
---|
22 | #Requires(post): /sbin/install-info /sbin/ldconfig
|
---|
23 | #Requires(preun): /sbin/install-info
|
---|
24 | #Requires(postun): /sbin/ldconfig
|
---|
25 | Requires: libcx >= 0.4
|
---|
26 |
|
---|
27 | %if 0%{?with_emacs}
|
---|
28 | # emacs-libidn merged with main package in 1.30-4
|
---|
29 | Obsoletes: emacs-libidn < 1.30-4
|
---|
30 | Provides: emacs-libidn < 1.30-4
|
---|
31 | Requires: emacs-filesystem >= %{_emacs_version}
|
---|
32 | %endif
|
---|
33 |
|
---|
34 | %description
|
---|
35 | GNU Libidn is an implementation of the Stringprep, Punycode and
|
---|
36 | IDNA specifications defined by the IETF Internationalized Domain
|
---|
37 | Names (IDN) working group, used for internationalized domain
|
---|
38 | names.
|
---|
39 |
|
---|
40 | %package devel
|
---|
41 | Summary: Development files for the libidn library
|
---|
42 | Group: Development/Libraries
|
---|
43 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
---|
44 | Requires: pkgconfig
|
---|
45 |
|
---|
46 | %description devel
|
---|
47 | This package includes header files and libraries necessary for
|
---|
48 | developing programs which use the GNU libidn library.
|
---|
49 |
|
---|
50 | %if 0%{?with_java}
|
---|
51 | %package java
|
---|
52 | Summary: Java port of the GNU Libidn library
|
---|
53 | BuildRequires: java-devel
|
---|
54 | BuildRequires: javapackages-local
|
---|
55 | BuildRequires: mvn(com.google.code.findbugs:annotations)
|
---|
56 | BuildRequires: mvn(com.google.guava:guava)
|
---|
57 | BuildRequires: mvn(junit:junit)
|
---|
58 | BuildArch: noarch
|
---|
59 |
|
---|
60 | %description java
|
---|
61 | GNU Libidn is a fully documented implementation of the Stringprep,
|
---|
62 | Punycode and IDNA specifications. Libidn's purpose is to encode
|
---|
63 | and decode internationalized domain names.
|
---|
64 |
|
---|
65 | This package contains the native Java port of the library.
|
---|
66 |
|
---|
67 | %package javadoc
|
---|
68 | Summary: Javadoc for %{name}-java
|
---|
69 | BuildArch: noarch
|
---|
70 |
|
---|
71 | %description javadoc
|
---|
72 | This 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
|
---|
84 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
---|
85 | rm -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 |
|
---|
89 | autoreconf -fvi
|
---|
90 |
|
---|
91 | # Cleanup
|
---|
92 | find . -name '*.jar' -print -delete
|
---|
93 | find . -name '*.class' -print -delete
|
---|
94 |
|
---|
95 |
|
---|
96 | %build
|
---|
97 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
98 | export LIBS="-lcx"
|
---|
99 | export VENDOR="%{vendor}"
|
---|
100 | #--with-lispdir=%{_emacs_sitelispdir}/%{name} --enable-java
|
---|
101 | %configure --disable-csharp --disable-static
|
---|
102 |
|
---|
103 | make %{?_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}
|
---|
112 | make install DESTDIR=$RPM_BUILD_ROOT pkgconfigdir=%{_libdir}/pkgconfig
|
---|
113 |
|
---|
114 | # provide more examples
|
---|
115 | make %{?_smp_mflags} -C examples distclean
|
---|
116 |
|
---|
117 | # clean up docs
|
---|
118 | find doc -name "Makefile*" | xargs rm
|
---|
119 | rm -rf $RPM_BUILD_ROOT%{_datadir}/info/dir
|
---|
120 |
|
---|
121 | rm -rf $RPM_BUILD_ROOT%{_datadir}/emacs
|
---|
122 |
|
---|
123 | rm -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
|
---|
129 | rm -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
|
---|
133 | rm -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
|
---|