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

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

spec: Initial .spec file for libidl.

File size: 5.2 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# %setup -q -n %{_name}-%{version}
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 -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
85autoreconf -fi
86
87%build
88export \
89 PATH=`echo $PATH | tr '\\\' '/'` \
90 EXEEXT=".exe" IMPLIBPREF="" IMPLIBSUFF="_dll.a" \
91 LDFLAGS="-Zomf -Zhigh-mem -lurpo -lmmap -lpthread -lintl" CFLAGS="-D__OS2__ -D__EMX__" \
92 PATH_SEPARATOR=";" PATHSEP=";" AWK=gawk SED=sed GREP=grep \
93 LD=gcc AR=ar STRIP=strip RANLIB=echo \
94 ECHO=echo PKG_CONFIG=pkg-config CC=gcc \
95 LEX=flex YACC="bison -y" HAVE_YACC=yes \
96 EMXOMFLD_TYPE="wlink" EMXOMFLD_LINKER="wl.exe"
97
98%configure \
99 --prefix=%{_prefix} \
100 --enable-shared --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
112emxomf -o %{buildroot}%{_libdir}/IDL-2.lib %{buildroot}%{_libdir}/IDL-2.a
113emximp -o %{buildroot}%{_libdir}/IDL-2_dll.lib %{buildroot}%{_libdir}/IDL-20.dll
114emximp -o %{buildroot}%{_libdir}/IDL-20_dll.lib %{buildroot}%{_libdir}/IDL-20.dll
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
119# %post -n libIDL-2-0 -p /sbin/ldconfig
120
121# %postun -n libIDL-2-0 -p /sbin/ldconfig
122
123%post devel
124### @todo Replace with ``%%info_post %%{_name}2.info`` when its available.
125if [ -f %{_infodir}/%{_name}2.info ]; then
126 %{_sbindir}/install-info.exe %{_infodir}/%{_name}2.info %{_infodir}/dir
127fi
128
129%postun devel
130### @todo Replace with ``%%info_postun %%{_name}2.info`` when its available.
131if [ $1 -eq 0 ]; then
132 if [ -f %{_infodir}/%{_name}2.info ]; then
133 %{_sbindir}/install-info.exe --delete %{_infodir}/%{_name}2.info %{_infodir}/dir
134 fi
135fi
136
137%files
138%defattr(-,root,root)
139%doc COPYING ChangeLog AUTHORS README* NEWS BUGS tstidl.c
140%{_libdir}/IDL-20.dll
141# generic directory for idl files
142# %dir %{_datadir}/idl
143
144%files devel
145%defattr(-,root,root)
146%{_bindir}/%{_name}-config-2
147%{_includedir}/*
148%doc %{_infodir}/%{_name}2.info
149%{_libdir}/pkgconfig/*.pc
150%{_libdir}/IDL-20.dbg
151%{_libdir}/IDL-2.a
152%{_libdir}/IDL-2.lib
153%{_libdir}/IDL-2_dll.a
154%{_libdir}/IDL-2_dll.lib
155%{_libdir}/IDL-20_dll.a
156%{_libdir}/IDL-20_dll.lib
157
158%changelog
159* Thu Dec 03 2015 Valery Sedletski - <_valerius@mail.ru> Initial OS/2 build
160- Initial OS/2 port
Note: See TracBrowser for help on using the repository browser.