mkdir -p tmp
cd tmp
+package="google-glog_$VERSION"
+
# Debian has very specific requirements about the naming of build
# directories, and tar archives. It also wants to write all generated
# packages to the parent of the source directory. We accommodate these
# requirements by building directly from the tar file.
-ln -s "${topdir}/${archive}.tar.gz" "${LIB}${archive}.orig.tar.gz"
-tar zfx "${LIB}${archive}.orig.tar.gz"
-[ -n "${LIB}" ] && mv "${archive}" "${LIB}${archive}"
-cd "${LIB}${archive}"
+ln -s "${topdir}/${archive}.tar.gz" "${LIB}${package}.orig.tar.gz"
+tar zfx "${LIB}${package}.orig.tar.gz"
+mv "${archive}" "${LIB}${package}"
+cd "${LIB}${package}"
# This is one of those 'specific requirements': where the deb control files live
-ln -s "packages/deb" "debian"
+cp -a "packages/deb" "debian"
# Now, we can call Debian's standard build tool
debuild -uc -us
+google-glog (0.3.4-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Google Inc. <opensource@google.com> Tue, 10 Mar 2015 12:02:20 +0900
+
google-glog (0.3.3-1) unstable; urgency=low
* New upstream release.
mkdir "$RPM_SOURCE_DIR"
mkdir "$RPM_BUILD_DIR"
-cp "$archive" "$RPM_SOURCE_DIR"
+cp "$archive" "$RPM_SOURCE_DIR"/v"$VERSION".tar.gz
rpmbuild -bb rpm/rpm.spec \
--define "NAME $PACKAGE" \
Version: %VERSION
Release: %rel
Group: Development/Libraries
-URL: http://code.google.com/p/google-glog
+URL: http://github.com/google/glog
License: BSD
Vendor: Google
Packager: Google Inc. <opensource@google.com>
-Source: http://%{NAME}.googlecode.com/files/%{NAME}-%{VERSION}.tar.gz
+Source: https://github.com/google/glog/archive/v%{VERSION}.tar.gz
Distribution: Redhat 7 and above.
Buildroot: %{_tmppath}/%{name}-root
Prefix: %prefix