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) cmake_minimum_required(VERSION 2.8)
set( GRIVE_VERSION "0.1.0" ) set( GRIVE_VERSION "0.1.1-pre" )
add_subdirectory( libgrive ) add_subdirectory( libgrive )
add_subdirectory( grive ) add_subdirectory( grive )

View File

@ -1,151 +1,91 @@
Name: grive #Correct it to 1 if you want git snapshot version
Version: 0.1.0 %global git 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)
BuildRequires:cppunit %if !%{git}
BuildRequires:libstdc++ #Should be corrected to match the Version
BuildRequires:libstdc++-devel %global gitcommit 15c5821
BuildRequires:json-c %else
BuildRequires:json-c-devel %global gitcommit b6fb4a6
BuildRequires:openssl %global gitfull b6fb4a604e51009ece1d8cfe7b45ed603097b47c
BuildRequires:openssl-devel %global date 20120531
BuildRequires:expat %endif
BuildRequires:expat-devel
BuildRequires:cppunit Name: grive
BuildRequires:libcurl Version: 0.1.0
BuildRequires:libcurl-devel %if %{git}
Requires:cppunit Release: 1.%{date}git%{gitcommit}%{?dist}
Requires:libstdc++ %else
Requires:json-c Release: 1%{?dist}
Requires:openssl %endif
Requires:expat
Requires:libcurl 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 %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: %package devel
- wait for changes in file system to occur and upload. Grive only sync when you run it. Summary: Development files for grive
- create new files in google drive. Grive only uploads changed files that already Requires: %{name}%{?_isa} = %{version}-%{release}
exist in server.
Of course these will be done in future, possibly the next release.
This is compiled in Fedora 16 x64. You need the following libraries to run: %description devel
json-c, libcurl, libstdc++ and openssl. CppUnit is also optional and required Development files for grive
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!
%prep %prep
%setup -q %{name} %setup -q -n match065-%{name}-%{gitcommit}
%build %build
cmake CMakeLists.txt %cmake .
make DESTDIR=%{buildroot} make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=%{buildroot} make install DESTDIR=$RPM_BUILD_ROOT
#%makeinstall DESTDIR=%{buildroot}
make DESTDIR=$RPM_BUILD_ROOT install %post -p /sbin/ldconfig
mkdir -p %{buildroot}/usr/lib
mkdir -p %{buildroot}/usr/local/grive/
mkdir -p %{buildroot}/usr/share/man/man1/
ln -s /usr/local/lib/libgrive.so %{buildroot}/usr/lib/libgrive.so %postun -p /sbin/ldconfig
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
%files %files
%defattr(-,root,root,-) %doc COPYING README
/usr/local/bin/grive %{_bindir}/%{name}
/usr/local/include/grive/drive/CommonUri.hh %{_libdir}/libgrive.so.*
/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
%post %files devel
/sbin/ldconfig || exit 1 %{_includedir}/%{name}*
exit 0 %{_libdir}/libgrive.so
%postun
/sbin/ldconfig
[ "$1" -eq 0 ]
exit 0
%doc README
%changelog %changelog
* Sat Jun 02 2012 Nestal Wan me@nestal.net * Thu Jun 07 2012 Vasiliy N. Glazov <vascom2@gmail.com> 0.1.0-1
- Removed gdbm as dependency. - Jump to release versioning
- Updated descriptions.
* Sat May 26 2012 Jesus Bustos jesus.bustos@adminilinux.org * Tue May 10 2012 Vasiliy N. Glazov <vascom2@gmail.com> 0.1.0-1.20120528git07553e5.R
- Changed the name from grive to match-grive. - Update to 0.1.0
- 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.0.4-20120510git0c3fdaa.1.R
- Initial release