Browse Source

Adding support for PKG and SPEC.

Brian Aker 16 years ago
parent
commit
d5cf3bddae
5 changed files with 102 additions and 7 deletions
  1. 5 5
      Makefile.am
  2. 2 2
      configure.ac
  3. 4 0
      support/Makefile.am
  4. 10 0
      support/gearmand.pc.in
  5. 81 0
      support/gearmand.spec.in

+ 5 - 5
Makefile.am

@@ -7,7 +7,7 @@
 
 ACLOCAL_AMFLAGS= -I m4
 
-SUBDIRS = libgearman gearmand tests examples
+SUBDIRS = libgearman gearmand tests examples support
 
 docs: all
 	${DOXYGEN} docs/Doxyfile.api
@@ -24,7 +24,7 @@ valgrind:
 
 # This needs to be fixed to not use Brian's home directory. :)
 rpm: all dist
-	cp libgearman-$(VERSION).tar.gz /home/brian/rpmbuild/SOURCES/
-	rpmbuild -ba support/libgearman.spec
-	cp /home/brian/rpmbuild/RPMS/x86_64/libgearman-$(VERSION)*.rpm .
-	cp /home/brian/rpmbuild/SRPMS/libgearman-$(VERSION)*.rpm .
+	cp gearmand-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
+	rpmbuild -ba support/gearmand.spec
+	cp ~/rpmbuild/RPMS/x86_64/gearmand-$(VERSION)*.rpm .
+	cp ~/rpmbuild/SRPMS/gearmand-$(VERSION)*.rpm .

+ 2 - 2
configure.ac

@@ -35,7 +35,7 @@ AC_CANONICAL_TARGET
 CFLAGS=${SAVE_CFLAGS}
 CXXFLAGS=${SAVE_CXXFLAGS}
 
-AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects)
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION,-Wall -Werror nostdinc subdir-objects)
 
 if test "x${enable_dependency_tracking}" = "x"
 then
@@ -296,7 +296,7 @@ AC_CHECK_PROGS([DOXYGEN], [doxygen])
 
 
 AC_CONFIG_FILES(Makefile libgearman/Makefile gearmand/Makefile
-                tests/Makefile examples/Makefile)
+                tests/Makefile examples/Makefile support/Makefile)
 
 AC_OUTPUT
 

+ 4 - 0
support/Makefile.am

@@ -0,0 +1,4 @@
+EXTRA_DIST = gearmand.spec
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gearmand.pc

+ 10 - 0
support/gearmand.pc.in

@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gearmand
+Description: Gearmand Server and  C library.
+Version: @VERSION@
+Libs: -L${libdir} -lgearman
+Cflags: -I${includedir}

+ 81 - 0
support/gearmand.spec.in

@@ -0,0 +1,81 @@
+Summary: memcached C library and command line tools
+Name: @PACKAGE@
+Version: @VERSION@
+Release: 1
+License: BSD
+Group: System Environment/Libraries
+BuildRequires: gcc-c++
+URL: http://tangent.org/552/libmemcached.html
+
+Packager: Jeff Fisher <guppy@techmonkeys.org>
+
+Source: http://download.tangent.org/libmemcached-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+%description
+libmemcached is a C client library to the memcached server
+(http://danga.com/memcached). It has been designed to be light on memory
+usage, and provide full access to server side methods.
+
+It also implements several command line tools:
+
+memcat - Copy the value of a key to standard output.
+memflush - Flush the contents of your servers.
+memrm - Remove a key(s) from the serrver.
+memstat - Dump the stats of your servers to standard output.
+memslap - Generate testing loads on a memcached cluster.
+memcp - Copy files to memcached servers.
+memerror - Creates human readable messages from libmemecached error codes.
+
+%prep
+%setup -q
+
+%configure
+
+%build
+%{__make} %{_smp_mflags}
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%{_bindir}/memcat
+%{_bindir}/memcp
+%{_bindir}/memerror
+%{_bindir}/memflush
+%{_bindir}/memrm
+%{_bindir}/memstat
+%{_bindir}/memslap
+%{_includedir}/libgearman/gearman.h
+%{_includedir}/libgearman/gearman.hh
+%{_includedir}/libgearman/libgearman_config.h
+%{_includedir}/libgearman/gearman_constants.h
+%{_includedir}/libgearman/gearman_get.h
+%{_includedir}/libgearman/gearman_result.h
+%{_includedir}/libgearman/gearman_server.h
+%{_includedir}/libgearman/gearman_storage.h
+%{_includedir}/libgearman/gearman_string.h
+%{_includedir}/libgearman/gearman_types.h
+%{_includedir}/libgearman/gearman_watchpoint.h
+%{_libdir}/libgearman.a
+%{_libdir}/libgearman.la
+%{_libdir}/libgearman.so
+%{_libdir}/libgearman.so.2
+%{_libdir}/libgearman.so.2.0.0
+%{_libdir}/pkgconfig/libgearman.pc
+%{_mandir}/man1/memcat.1.gz
+%{_mandir}/man1/memcp.1.gz
+%{_mandir}/man1/memerror.1.gz
+%{_mandir}/man1/memflush.1.gz
+%{_mandir}/man1/memrm.1.gz
+%{_mandir}/man1/memslap.1.gz
+%{_mandir}/man1/memstat.1.gz
+%{_mandir}/man3/libmemcached.3.gz
+
+%changelog
+* Wed Jan 7 2009 Brian Aker <brian@tangent.org> - 0.1-1
+- Initial package