updated RPM spec from Vascom

pull/40/head
Nestal Wan 2012-06-09 11:03:46 +08:00
parent facdf88058
commit b8a1d02ec8
2 changed files with 66 additions and 126 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8)
set( GRIVE_VERSION "0.1.0" )
set( GRIVE_VERSION "0.1.1-pre" )
add_subdirectory( libgrive )
add_subdirectory( grive )

View File

@ -1,151 +1,91 @@
Name: grive
Version: 0.1.0
Release: 1%{?dist}
Summary: An Open Source Linux Client for Google Drive
Group: System Environment/Base
License: GPLv2+
URL:http://match065.github.com/grive/
Source0:grive-0.1.0.tar.gz
BuildRoot:%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXX)
#Correct it to 1 if you want git snapshot version
%global git 0
BuildRequires:cppunit
BuildRequires:libstdc++
BuildRequires:libstdc++-devel
BuildRequires:json-c
BuildRequires:json-c-devel
BuildRequires:openssl
BuildRequires:openssl-devel
BuildRequires:expat
BuildRequires:expat-devel
BuildRequires:cppunit
BuildRequires:libcurl
BuildRequires:libcurl-devel
Requires:cppunit
Requires:libstdc++
Requires:json-c
Requires:openssl
Requires:expat
Requires:libcurl
%if !%{git}
#Should be corrected to match the Version
%global gitcommit 15c5821
%else
%global gitcommit b6fb4a6
%global gitfull b6fb4a604e51009ece1d8cfe7b45ed603097b47c
%global date 20120531
%endif
Name: grive
Version: 0.1.0
%if %{git}
Release: 1.%{date}git%{gitcommit}%{?dist}
%else
Release: 1%{?dist}
%endif
Summary: An open source Linux client for Google Drive
License: GPLv2
URL: http://match065.github.com/grive/
%if %{git}
Source0: https://github.com/match065/%{name}/tarball/%{gitfull}
%else
Source0: https://github.com/match065/%{name}/tarball/v%{version}
%endif
BuildRequires: cmake
BuildRequires: libstdc++-devel
BuildRequires: libcurl-devel
BuildRequires: json-c-devel
BuildRequires: expat-devel
BuildRequires: openssl-devel
BuildRequires: boost-devel
BuildRequires: binutils-devel
#BuildRequires: gdbm-devel
%description
Grive 0.1.0
The purpose of this project is to provide an independent implementation
of Google Drive client. It uses the Google Document List API to talk to
the servers in Google. The code is written in standard C++.
Grive is still considered experimental. It just downloads all the files in your google drive
into the current directory. After you make some changes to the local files, run grive and
it will upload your changes back to your google drive.
There are a few things that grive does not do at the moment:
- wait for changes in file system to occur and upload. Grive only sync when you run it.
- create new files in google drive. Grive only uploads changed files that already
exist in server.
Of course these will be done in future, possibly the next release.
%package devel
Summary: Development files for grive
Requires: %{name}%{?_isa} = %{version}-%{release}
This is compiled in Fedora 16 x64. You need the following libraries to run:
json-c, libcurl, libstdc++ and openssl. CppUnit is also optional and required
only if you want to build the test cases.
When grive is ran for the first time, you should use the "-a" argument to grant
permission to grive to access to your Google Drive. An URL should be printed.
Go to the link. You will need to login to your google account if you haven't
done so. After granting the permission to grive, the browser will show you
an authenication code. Copy-and-paste that to the standard input of grive.
If everything works fine, grive will create a .grive file in your home directory.
It will also start downloading files from your Google Drive to your current directory.
Enjoy!
%description devel
Development files for grive
%prep
%setup -q %{name}
%setup -q -n match065-%{name}-%{gitcommit}
%build
cmake CMakeLists.txt
make DESTDIR=%{buildroot}
%cmake .
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=%{buildroot}
#%makeinstall DESTDIR=%{buildroot}
make install DESTDIR=$RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p %{buildroot}/usr/lib
mkdir -p %{buildroot}/usr/local/grive/
mkdir -p %{buildroot}/usr/share/man/man1/
%post -p /sbin/ldconfig
ln -s /usr/local/lib/libgrive.so %{buildroot}/usr/lib/libgrive.so
ln -s /usr/local/lib/libgrive.so.0 %{buildroot}/usr/lib/libgrive.so.0
ln -s /usr/local/lib/libgrive.so.0.1.0 %{buildroot}/usr/lib/libgrive.so.0.1.0
cp ~/rpmbuild/BUILD/grive-0.1.0/README %{buildroot}/usr/local/grive/
mv ~/rpmbuild/BUILD/grive-0.1.0/README %{buildroot}/usr/share/man/man1/grive.1
chmod -x $RPM_BUILD_ROOT%{_mandir}/man1/grive.1
%Clean
rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
/usr/local/bin/grive
/usr/local/include/grive/drive/CommonUri.hh
/usr/local/include/grive/drive/Drive.hh
/usr/local/include/grive/drive/Entry.hh
/usr/local/include/grive/drive/Resource.hh
/usr/local/include/grive/drive/ResourceTree.hh
/usr/local/include/grive/drive/State.hh
/usr/local/include/grive/protocol/Json.hh
/usr/local/include/grive/protocol/JsonResponse.hh
/usr/local/include/grive/protocol/OAuth2.hh
/usr/local/include/grive/util/CArray.hh
/usr/local/include/grive/util/Crypt.hh
/usr/local/include/grive/util/DateTime.hh
/usr/local/include/grive/util/DefaultLog.hh
/usr/local/include/grive/util/Destroy.hh
/usr/local/include/grive/util/Exception.hh
/usr/local/include/grive/util/FileSystem.hh
/usr/local/include/grive/util/Function.hh
/usr/local/include/grive/util/Log.hh
/usr/local/include/grive/util/OS.hh
/usr/local/include/grive/util/SignalHandler.hh
/usr/local/include/grive/util/StdioFile.hh
/usr/local/include/grive/xml/Error.hh
/usr/local/include/grive/xml/Node.hh
/usr/local/include/grive/xml/NodeSet.hh
/usr/local/include/grive/xml/TreeBuilder.hh
/usr/local/lib/libgrive.so
/usr/local/lib/libgrive.so.0
/usr/local/lib/libgrive.so.0.1.0
/usr/lib/libgrive.so
/usr/lib/libgrive.so.0
/usr/lib/libgrive.so.0.1.0
/usr/local/grive/README
/usr/share/man/man1/grive.1.gz
%doc COPYING README
%{_bindir}/%{name}
%{_libdir}/libgrive.so.*
%post
/sbin/ldconfig || exit 1
exit 0
%postun
/sbin/ldconfig
[ "$1" -eq 0 ]
exit 0
%files devel
%{_includedir}/%{name}*
%{_libdir}/libgrive.so
%doc README
%changelog
* Sat Jun 02 2012 Nestal Wan me@nestal.net
- Removed gdbm as dependency.
- Updated descriptions.
* Thu Jun 07 2012 Vasiliy N. Glazov <vascom2@gmail.com> 0.1.0-1
- Jump to release versioning
* Sat May 26 2012 Jesus Bustos jesus.bustos@adminilinux.org
- Changed the name from grive to match-grive.
- Corrected previos changelog.
* Tue May 25 2012 Jesus Bustos jesus.bustos@adminlinux.org
- Added man page.
* Tue May 10 2012 Vasiliy N. Glazov <vascom2@gmail.com> 0.1.0-1.20120528git07553e5.R
- Update to 0.1.0
* Tue May 10 2012 Vasiliy N. Glazov <vascom2@gmail.com> 0.0.4-20120510git0c3fdaa.1.R
- Initial release