Browse Source

Fix dist-rpm building to work with new versioning system also fixes Issue #148

Tuukka Pasanen 6 years ago
parent
commit
e20a202b00
2 changed files with 11 additions and 10 deletions
  1. 5 4
      rpm/include.mk
  2. 6 6
      support/gearmand.spec.in

+ 5 - 4
rpm/include.mk

@@ -3,15 +3,16 @@
 RPM_BUILDDIR= ~/rpmbuild
 RPM_SOURCESDIR= $(RPM_BUILDDIR)/SOURCES
 
-RPM_BUILD_TARGET= @PACKAGE@-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+RPM_BUILD_TARGET= @PACKAGE@-@LIBGEARMAN_VERSION_STRING@-@RPM_RELEASE@.@build_cpu@.rpm
 RPM_SOURCE= $(RPM_SOURCESDIR)/$(DIST_ARCHIVES)
 
 RPMS=
 RPMS+= $(RPM_BUILD_TARGET)
-RPMS+= @PACKAGE@-devel-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
-RPMS+= @PACKAGE@-debuginfo-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+RPMS+= @PACKAGE@-devel-@LIBGEARMAN_VERSION_STRING@-@RPM_RELEASE@.@build_cpu@.rpm
+# If you build Debug packages enable this
+#RPMS+= @PACKAGE@-debuginfo-@LIBGEARMAN_VERSION_STRING@-@RPM_RELEASE@.@build_cpu@.rpm
 
-SRPMS= @PACKAGE@-@VERSION@-@RPM_RELEASE@.src.rpm
+SRPMS= @PACKAGE@-@LIBGEARMAN_VERSION_STRING@-@RPM_RELEASE@.src.rpm
 
 RPM_DIST= $(RPMS) $(SRPMS)
 

+ 6 - 6
support/gearmand.spec.in

@@ -1,6 +1,6 @@
 Summary: Gearman Server and C Library
 Name: @PACKAGE@
-Version: @VERSION@
+Version: @LIBGEARMAN_VERSION_STRING@
 Release: @RPM_RELEASE@
 License: BSD
 Group: System Environment/Libraries
@@ -10,7 +10,7 @@ Requires: sqlite, libevent >= 1.4, boost-program-options >=  1.39
 
 Packager: Brian Aker <brian@tangent.org>
 
-Source: https://github.com/gearman/gearmand/archive/%{version}.tar.gz
+Source: @PACKAGE@-@VERSION@.tar.gz
 Source1: support/gearmand.init
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 
@@ -40,7 +40,7 @@ for %{name}. If you like to develop programs using %{name},
 you will need to install %{name}-devel.
 
 %prep
-%setup -q
+%setup -q -n @PACKAGE@-@VERSION@
 
 %configure --disable-libpq --disable-libtokyocabinet --disable-libdrizzle --disable-libmemcached --enable-jobserver=no
 
@@ -95,7 +95,7 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING NEWS README.md HACKING THANKS
+%doc AUTHORS COPYING NEWS HACKING THANKS
 %{_bindir}/gearadmin
 %{_bindir}/gearman
 %{_libdir}/libgearman.la
@@ -106,7 +106,7 @@ fi
 
 %files server
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING NEWS README.md HACKING THANKS
+%doc AUTHORS COPYING NEWS HACKING THANKS
 %{_mandir}/man8/gearmand.8.gz
 %{_sbindir}/gearmand
 /etc/rc.d/init.d/gearmand
@@ -115,7 +115,7 @@ fi
 
 %files devel
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING NEWS README.md HACKING THANKS
+%doc AUTHORS COPYING NEWS HACKING THANKS
 %{_includedir}/libgearman/gearman.h
 %{_includedir}/libgearman-1.0/actions.h
 %{_includedir}/libgearman-1.0/aggregator.h