# when Koji is building SRPM, dependencies won't be installed yet %if %($(pkg-config gedit-2.20 || pkg-config gedit) ; echo $?) # This will get overridden by pkg-config; defaulting to the version in F9 %global gedit_version 22.2 %else %if 0%{?fedora} >= 15 %global gedit_version %(pkg-config gedit --modversion) %else %global gedit_version %(pkg-config gedit-2.20 --modversion) %endif %endif %global debug_package %{nil} %global major_ver 0.3 %if 0%{?fedora} == 14 || 0%{?rhel} >= 6 %global valapkg vala-0.10 %endif Name: gedit-valencia Version: %{major_ver}.0 Release: 4%{?dist} Summary: A gedit plugin providing lightweight Vala IDE Group: Development/Tools License: LGPLv2+ URL: http://yorba.org/valencia Source0: http://yorba.org/download/valencia/%{major_ver}/valencia-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gedit-devel vala-devel libgee-devel vte-devel Requires: gedit >= %{gedit_version} %description Valencia is a gedit plugin that turns gedit into a lightweight IDE for Vala. Using Valencia, you can easily browse between symbols in a Vala program. You can build a Vala program inside gedit and can easily jump to lines with build errors. You can also get tooltips for methods and get autocompletion suggestions by invoking autocomplete in the appropriate context. %prep %setup -q -n valencia-%{version} %if 0%{?fedora} >=14 || 0%{?rhel} >= 6 # These distributions have vala >= 0.9.5, which provide # vala-%%{api_ver} not vala-1.0 sed -i.fix_valapkg "s|vala-1.0|%{valapkg}|" Makefile %endif %build VFLAGS= for f in $RPM_OPT_FLAGS; do if [ $f != "-g" ]; then VFLAGS="$VFLAGS -X $f " fi done make %{?_smp_mflags} VFLAGS="$VFLAGS" %install rm -rf $RPM_BUILD_ROOT PLUGINDIR=$RPM_BUILD_ROOT%{_libdir}/gedit-2/plugins mkdir -p $PLUGINDIR # no debuginfo generation; need to strip the library by hand strip libvalencia.so cp -p libvalencia.so valencia.gedit-plugin $PLUGINDIR %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AUTHORS COPYING NEWS README THANKS %{_libdir}/gedit-2/plugins/*valencia* %changelog * Sat Nov 27 2010 Michel Salim <salimma@fedoraproject.org> - 0.3.0-4 - More flexibly handle builds for different Vala API versions * Tue Oct 19 2010 Michel Salim <salimma@fedoraproject.org> - 0.3.0-3 - Pass compiler flags as VFLAGS, not CFLAGS - Disable debuginfo generation for now, since the script cannot locate Vala sources unless one generates intermediate C sources * Wed Sep 15 2010 Michel Salim <salimma@fedoraproject.org> - 0.3.0-2 - Make valencia buildable against vala >= 0.9.5 in F-14+ and EL-6+ * Mon Jul 26 2010 Michel Salim <salimma@fedoraproject.org> - 0.3.0-1 - Update to 0.3.0 * Sun Aug 23 2009 Michel Salim <salimma@fedoraproject.org> - 0.2.1-1 - Initial Fedora package