source: spec/trunk/SPECS/libidl.spec@ 858

Last change on this file since 858 was 812, checked in by Yuri Dario, 9 years ago

spec: libidl, use correct svn revision for building...

File size: 6.0 KB
Line 
1#
2# spec file for package libidl
3#
4# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
5#
6# All modifications and additions to the file contributed by third parties
7# remain the property of their copyright owners, unless otherwise agreed
8# upon. The license for this file, and modifications and additions to the
9# file, is the same license as for the pristine package itself (unless the
10# license for the pristine package is not an Open Source License, in which
11# case the license is the MIT License). An "Open Source License" is a
12# license that conforms to the Open Source Definition (Version 1.9)
13# published by the Open Source Initiative.
14
15# Please submit bugfixes or comments via http://bugs.opensuse.org/
16#
17
18#%define svn_url n:/src/ports/libidl
19%define svn_url http://svn.netlabs.org/repos/ports/libidl/trunk
20%define svn_rev 1330
21
22Name: libidl
23%define _name libIDL
24Url: http://www.gnome.org
25Version: 0.8.14
26Release: 6%{?dist}
27#Release: 42.20
28# NOTE: on upgrade to a new upstream version, change the Obsoletes from <= to < (here and in baselibs.conf)
29Summary: IDL Parsing Library
30License: LGPL-2.1+
31Group: System/Libraries
32Vendor: bww bitwise works GmbH
33
34Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
35
36Provides: %{name} = %{version}
37# Note: we keep <= (and a rpmlint warning...) until we get a version higher than 0.8.14 (when this provides/obsoletes was introduced)
38Obsoletes: %{name} <= %{version}
39# bug437293
40#%ifarch ppc64
41#Obsoletes: libidl-64bit
42#%endif
43#
44Requires: glib2 libgcc1
45BuildRequires: bison
46BuildRequires: flex
47BuildRequires: glib2-devel
48BuildRequires: pkgconfig
49
50%description
51LibIDL is a small library for creating parse trees of CORBA
52v2.2-compliant Interface Definition Language (IDL) files. IDL is a
53specification for defining interfaces that can be used between
54different CORBA implementations.
55
56%package devel
57Summary: Include Files and Libraries mandatory for Development
58Group: Development/Languages/Other
59Requires: %{name} = %{version}-%{release}
60#PreReq: %install_info_prereq
61# bug437293
62#%ifarch ppc64
63#Obsoletes: libidl-devel-64bit
64#%endif
65#
66
67%description devel
68LibIDL is a small library for creating parse trees of CORBA v2.2
69compliant Interface Definition Language (IDL) files, which is a
70specification for defining interfaces which can be used between
71different CORBA implementations.
72
73%debug_package
74
75%prep
76%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}
77%setup -q
78%else
79%setup -q -n "%{name}-%{version}" -Tc
80svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
81rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
82(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
83%endif
84
85%build
86export \
87 LDFLAGS="-Zhigh-mem" CFLAGS="-D__OS2__ -D__EMX__" RANLIB=echo
88
89autoreconf -fiv
90
91%configure \
92 --enable-shared \
93 --enable-static
94
95# Work around ASH bug: change RANLIB="echo\n" to RANLIB="echo" in libtool
96sed -e ':a;N;$!ba;s/RANLIB\=\"echo\n/RANLIB="echo/g' \
97 <%{_builddir}/%{?buildsubdir}/libtool \
98 >%{_builddir}/%{?buildsubdir}/libtool2
99rm -rf %{_builddir}/%{?buildsubdir}/libtool
100mv -f %{_builddir}/%{?buildsubdir}/libtool2 %{_builddir}/%{?buildsubdir}/libtool
101
102%{__make} %{?jobs:-j%jobs}
103
104%install
105%makeinstall
106find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
107mkdir -p $RPM_BUILD_ROOT%{_datadir}
108# mkdir $RPM_BUILD_ROOT%{_datadir}/idl
109rm -f %{buildroot}%{_datadir}/info/dir
110# rm -f %{buildroot}%{_libdir}/*.lib
111emxomf -o %{buildroot}%{_libdir}/IDL-2.lib %{buildroot}%{_libdir}/IDL-2.a
112emximp -o %{buildroot}%{_libdir}/IDL-2_dll.lib %{buildroot}%{_libdir}/idl20.dll
113emximp -o %{buildroot}%{_libdir}/IDL-20_dll.lib %{buildroot}%{_libdir}/idl20.dll
114# change shell path in libIDL-config-2
115sed -e 's-\#\! \/bin\/sh-#! /@unixroot/usr/bin/sh-g' \
116 <%{buildroot}%{_bindir}/libIDL-config-2 \
117 >%{buildroot}%{_bindir}/libIDL-config-1
118rm -rf %{buildroot}%{_bindir}/libIDL-config-2
119mv -f %{buildroot}%{_bindir}/libIDL-config-1 %{buildroot}%{_bindir}/libIDL-config-2
120chmod 755 %{buildroot}%{_bindir}/libIDL-config-2
121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125# %post -n libIDL-2-0 -p /sbin/ldconfig
126
127# %postun -n libIDL-2-0 -p /sbin/ldconfig
128
129%post devel
130### @todo Replace with ``%%info_post %%{_name}2.info`` when its available.
131if [ -f %{_infodir}/%{_name}2.info ]; then
132 %{_sbindir}/install-info.exe %{_infodir}/%{_name}2.info %{_infodir}/dir
133fi
134
135%postun devel
136### @todo Replace with ``%%info_postun %%{_name}2.info`` when its available.
137if [ $1 -eq 0 ]; then
138 if [ -f %{_infodir}/%{_name}2.info ]; then
139 %{_sbindir}/install-info.exe --delete %{_infodir}/%{_name}2.info %{_infodir}/dir
140 fi
141fi
142
143%files
144%defattr(-,root,root)
145%doc COPYING ChangeLog AUTHORS README* NEWS BUGS tstidl.c
146%{_libdir}/idl*.dll
147# generic directory for idl files
148# %dir %{_datadir}/idl
149
150%files devel
151%defattr(-,root,root)
152%{_bindir}/%{_name}-config-2
153%{_includedir}/*
154%doc %{_infodir}/%{_name}2.info
155%{_libdir}/pkgconfig/*.pc
156%{_libdir}/IDL-2.a
157%{_libdir}/IDL-2_dll.a
158%{_libdir}/IDL-20_dll.a
159%{_libdir}/IDL-2.lib
160%{_libdir}/IDL-2_dll.lib
161%{_libdir}/IDL-20_dll.lib
162
163%changelog
164* Wed Jun 22 2016 yd <yd@os2power.com> 0.8.14-6
165- use correct svn revision for building.
166
167* Sat Jun 18 2016 yd <yd@os2power.com> 0.8.14-5
168- rebuild for glib2 2.33.
169
170* Thu Mar 10 2016 Valery Sedletski <_valerius@mail.ru> - 0.8.14-4
171- fixed permissions for libIDL-config-2 to be 755
172- fixed Requires directive for 'devel' package to depend on %{name} = %{version}-%{release}
173
174* Mon Feb 29 2016 Valery Sedletski <_valerius@mail.ru> - 0.8.14-3
175- Added needed Requires and BuildRequires directives
176
177* Thu Feb 18 2016 Valery Sedletski - <_valerius@mail.ru> 0.8.14-2
178- changed libs format to both a.out and OMF
179- added debug package
180- added OS/2 DLL shortname
181
182* Thu Dec 03 2015 Valery Sedletski - <_valerius@mail.ru> Initial OS/2 build
183- Initial OS/2 port
Note: See TracBrowser for help on using the repository browser.