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

Last change on this file since 659 was 659, checked in by valerius, 10 years ago

spec: libidl: Changed a.out libs to OMF ones

File size: 5.1 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 1205
21
22Name: libidl
23%define _name libIDL
24Url: http://www.gnome.org
25Version: 0.8.14
26Release: 1%{?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
30Vendor: Andrew T. Veliath <andrewtv@usa.net>
31License: LGPL-2.1+
32Group: System/Libraries
33Provides: %{name} = %{version}
34# Note: we keep <= (and a rpmlint warning...) until we get a version higher than 0.8.14 (when this provides/obsoletes was introduced)
35Obsoletes: %{name} <= %{version}
36# bug437293
37#%ifarch ppc64
38#Obsoletes: libidl-64bit
39#%endif
40#
41Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
42#Source: http://ftp.gnome.org/pub/GNOME/sources/%{_name}/0.8/%{_name}-%{version}.tar.bz2
43#Source99: baselibs.conf
44BuildRequires: bison
45BuildRequires: flex
46BuildRequires: glib2-devel
47BuildRequires: urpo-devel
48BuildRequires: pkgconfig
49BuildRoot: %{_tmppath}/%{name}-%{version}-build
50
51%description
52LibIDL is a small library for creating parse trees of CORBA
53v2.2-compliant Interface Definition Language (IDL) files. IDL is a
54specification for defining interfaces that can be used between
55different CORBA implementations.
56
57%package devel
58Summary: Include Files and Libraries mandatory for Development
59Group: Development/Languages/Other
60Requires: libidl = %{version}
61#PreReq: %install_info_prereq
62# bug437293
63#%ifarch ppc64
64#Obsoletes: libidl-devel-64bit
65#%endif
66#
67
68%description devel
69LibIDL is a small library for creating parse trees of CORBA v2.2
70compliant Interface Definition Language (IDL) files, which is a
71specification for defining interfaces which can be used between
72different CORBA implementations.
73
74%prep
75%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}
76%setup -q
77%else
78%setup -q -n "%{name}-%{version}" -Tc
79svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
80rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
81(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
82%endif
83
84autoreconf -fi
85
86%build
87export \
88 PATH=`echo $PATH | tr '\\\' '/'` \
89 EXEEXT=".exe" IMPLIBPREF="" IMPLIBSUFF="_dll.lib" \
90 LDFLAGS="-Zomf -Zhigh-mem -lurpo -lmmap -lpthread -lintl" CFLAGS="-Zomf -D__OS2__ -D__EMX__" \
91 PATH_SEPARATOR=";" PATHSEP=";" AWK=gawk SED=sed GREP=grep \
92 LD=gcc AR=emxomfar STRIP=strip RANLIB=echo \
93 ECHO=echo PKG_CONFIG=pkg-config CC=gcc \
94 LEX=flex YACC="bison -y" HAVE_YACC=yes \
95 EMXOMFLD_TYPE="wlink" EMXOMFLD_LINKER="wl.exe"
96
97%configure \
98 --prefix=%{_prefix} \
99 --enable-shared \
100 --enable-static
101
102# --with-pic
103
104%{__make} %{?jobs:-j%jobs}
105
106%install
107%makeinstall
108find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
109mkdir -p $RPM_BUILD_ROOT%{_datadir}
110# mkdir $RPM_BUILD_ROOT%{_datadir}/idl
111rm -f %{buildroot}%{_datadir}/info/dir
112# rm -f %{buildroot}%{_libdir}/*.lib
113# emxomf -o %{buildroot}%{_libdir}/IDL-2.lib %{buildroot}%{_libdir}/IDL-2.a
114# emximp -o %{buildroot}%{_libdir}/IDL-2_dll.lib %{buildroot}%{_libdir}/IDL-20.dll
115# emximp -o %{buildroot}%{_libdir}/IDL-20_dll.lib %{buildroot}%{_libdir}/IDL-20.dll
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120# %post -n libIDL-2-0 -p /sbin/ldconfig
121
122# %postun -n libIDL-2-0 -p /sbin/ldconfig
123
124%post devel
125### @todo Replace with ``%%info_post %%{_name}2.info`` when its available.
126if [ -f %{_infodir}/%{_name}2.info ]; then
127 %{_sbindir}/install-info.exe %{_infodir}/%{_name}2.info %{_infodir}/dir
128fi
129
130%postun devel
131### @todo Replace with ``%%info_postun %%{_name}2.info`` when its available.
132if [ $1 -eq 0 ]; then
133 if [ -f %{_infodir}/%{_name}2.info ]; then
134 %{_sbindir}/install-info.exe --delete %{_infodir}/%{_name}2.info %{_infodir}/dir
135 fi
136fi
137
138%files
139%defattr(-,root,root)
140%doc COPYING ChangeLog AUTHORS README* NEWS BUGS tstidl.c
141%{_libdir}/idl*.dll
142# generic directory for idl files
143# %dir %{_datadir}/idl
144
145%files devel
146%defattr(-,root,root)
147%{_bindir}/%{_name}-config-2
148%{_includedir}/*
149%doc %{_infodir}/%{_name}2.info
150%{_libdir}/pkgconfig/*.pc
151%{_libdir}/idl*.dbg
152%{_libdir}/IDL-2.lib
153%{_libdir}/IDL-2_dll.lib
154%{_libdir}/IDL-20_dll.lib
155
156%changelog
157* Thu Dec 03 2015 Valery Sedletski - <_valerius@mail.ru> Initial OS/2 build
158- Initial OS/2 port
Note: See TracBrowser for help on using the repository browser.