Blob Blame History Raw
# when Koji is building SRPM, dependencies won't be installed yet
%if %($(pkg-config gedit) ; echo $?)
# This will get overridden by pkg-config; defaulting to minimum req
%global gedit_version 2.91.0
%else
%global gedit_version %(pkg-config gedit --modversion)
%endif

%global debug_package %{nil}
%global major_ver 0.3

%global commit_hash 808152718e3ab
%global alphatag    20110701git%{commit_hash}

Name:           gedit-valencia
Version:        %{major_ver}.0
Release:        9.%{alphatag}%{?dist}
Summary:        A gedit plugin providing lightweight Vala IDE

Group:          Development/Tools
License:        LGPLv2+
URL:            http://yorba.org/valencia
# git archive --format=tar --prefix=valencia-%%{version}-%%{commit_hash}/ %%{commit_hash} | xz > ../valencia-%%{version}-%%{commit_hash}.tar.xz
Source0:        valencia-%{version}-%{commit_hash}.tar.xz
#Source0:        http://yorba.org/download/valencia/%{major_ver}/valencia-%{version}.tar.bz2

BuildRequires:  gedit-devel vala-devel libgee-devel vte3-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}-%{commit_hash}

%if 0%{?fedora} >= 16
# These distributions have vala >= 0.13.0, which provide
# libvala-0.14 not libvala-0.12
sed -i.fix_valapkg "s|libvala-0.12|libvala-0.14|" 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/plugins
mkdir -p $PLUGINDIR
# no debuginfo generation; need to strip the library by hand
strip libvalencia.so
cp -p libvalencia.so valencia.plugin $PLUGINDIR


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README THANKS
%{_libdir}/gedit/plugins/*valencia*



%changelog
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-9.20110701git808152718e3ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.3.0-8.20110701git808152718e3ab
- Rebuild for new libpng

* Sun Aug  7 2011 Michel Salim <salimma@fedoraproject.org> - 0.3.0-7.20110701git808152718e3ab
- Rebuild against Vala 0.13.1

* Thu Jul  7 2011 Michel Salim <salimma@fedoraproject.org> - 0.3.0-6.20110701git808152718e3ab
- Snapshot release with gedit 3 support

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* 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