tomh / rpms / gyp

Forked from rpms/gyp 4 years ago
Clone
4eeaed2
%global		revision	1010
29579c0
%{expand:	%%global	archivename	gyp-%{version}%{?revision:-svn%{revision}}}
29579c0
%if !(0%{?fedora} > 12 || 0%{?rhel} > 5)
29579c0
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
29579c0
%endif
29579c0
29579c0
Name:		gyp
29579c0
Version:	0.1
4eeaed2
Release:	0.6%{?revision:.%{revision}svn}%{?dist}
29579c0
Summary:	Generate Your Projects
29579c0
29579c0
Group:		Development/Tools
29579c0
License:	BSD
29579c0
URL:		http://code.google.com/p/gyp/
29579c0
# No released tarball avaiable. so the tarball was generated
29579c0
# from svn as following:
29579c0
#
29579c0
# 1. svn co http://gyp.googlecode.com/svn/trunk gyp
29579c0
# 2. cd gyp
29579c0
# 3. version=$(grep version= setup.py|cut -d\' -f2)
29579c0
# 4. revision=$(svn info|grep -E "^Revision:"|cut -d' ' -f2)
29579c0
# 5. tar -a --exclude-vcs -cf /tmp/gyp-$version-svn$revision.tar.bz2 *
29579c0
Source0:	%{archivename}.tar.bz2
b9cc533
Patch0:		gyp-rpmoptflags.patch
29579c0
29579c0
BuildRequires:	python2-devel
29579c0
BuildArch:	noarch
29579c0
29579c0
%description
29579c0
GYP is a tool to generates native Visual Studio, Xcode and SCons
29579c0
and/or make build files from a platform-independent input format.
29579c0
29579c0
Its syntax is a universal cross-platform build representation
29579c0
that still allows sufficient per-platform flexibility to accommodate
29579c0
irreconcilable differences.
29579c0
29579c0
29579c0
%prep
29579c0
%setup -q -c -n %{archivename}
4eeaed2
%patch0 -p1 -b .0-rpmoptflags
29579c0
for i in $(find pylib -name '*.py'); do
29579c0
	sed -e '\,#![ \t]*/.*python,{d}' $i > $i.new && touch -r $i $i.new && mv $i.new $i
29579c0
done
29579c0
29579c0
%build
29579c0
%{__python} setup.py build
29579c0
29579c0
29579c0
%install
29579c0
rm -rf $RPM_BUILD_ROOT
29579c0
29579c0
%{__python} setup.py install --root $RPM_BUILD_ROOT --skip-build
29579c0
29579c0
29579c0
%clean
29579c0
rm -rf $RPM_BUILD_ROOT
29579c0
29579c0
29579c0
%files
29579c0
%defattr(-,root,root,-)
29579c0
%doc AUTHORS LICENSE
29579c0
%{_bindir}/gyp
29579c0
%{python_sitelib}/*
29579c0
29579c0
29579c0
%changelog
4eeaed2
* Tue Aug 23 2011 Akira TAGOH <tagoh@redhat.com> - 0.1-0.6.1010svn
4eeaed2
- Rebase to r1010.
4eeaed2
0ee92c9
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.5.840svn
0ee92c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0ee92c9
b9cc533
* Fri Aug 20 2010 Akira TAGOH <tagoh@redhat.com> - 0.1-0.4.840svn
b9cc533
- Rebase to r840.
b9cc533
- generate Makefile with RPM_OPT_FLAGS in CCFLAGS.
b9cc533
29579c0
* Fri Aug  6 2010 Akira TAGOH <tagoh@redhat.com> - 0.1-0.3.839svn
29579c0
- Drop the unnecessary macro.
29579c0
29579c0
* Thu Aug  5 2010 Akira TAGOH 
29579c0
- Update the spec file according to the suggestion in rhbz#621242.
29579c0
29579c0
* Wed Aug  4 2010 Akira TAGOH <tagoh@redhat.com> - 0.1-0.1.839svn
29579c0
- Initial packaging.
29579c0