google_hash 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +21 -0
- data/Rakefile +11 -0
- data/VERSION +1 -0
- data/ext/extconf.rb +15 -0
- data/ext/go.cpp +109 -0
- data/ext/sparsehash-1.5.2/AUTHORS +2 -0
- data/ext/sparsehash-1.5.2/COPYING +28 -0
- data/ext/sparsehash-1.5.2/ChangeLog +167 -0
- data/ext/sparsehash-1.5.2/INSTALL +236 -0
- data/ext/sparsehash-1.5.2/Makefile.am +157 -0
- data/ext/sparsehash-1.5.2/Makefile.in +1019 -0
- data/ext/sparsehash-1.5.2/NEWS +0 -0
- data/ext/sparsehash-1.5.2/README +149 -0
- data/ext/sparsehash-1.5.2/README.windows +25 -0
- data/ext/sparsehash-1.5.2/TODO +28 -0
- data/ext/sparsehash-1.5.2/aclocal.m4 +868 -0
- data/ext/sparsehash-1.5.2/compile +99 -0
- data/ext/sparsehash-1.5.2/config.guess +1516 -0
- data/ext/sparsehash-1.5.2/config.sub +1626 -0
- data/ext/sparsehash-1.5.2/configure +8054 -0
- data/ext/sparsehash-1.5.2/configure.ac +74 -0
- data/ext/sparsehash-1.5.2/depcomp +530 -0
- data/ext/sparsehash-1.5.2/doc/dense_hash_map.html +1591 -0
- data/ext/sparsehash-1.5.2/doc/dense_hash_set.html +1445 -0
- data/ext/sparsehash-1.5.2/doc/designstyle.css +115 -0
- data/ext/sparsehash-1.5.2/doc/implementation.html +365 -0
- data/ext/sparsehash-1.5.2/doc/index.html +69 -0
- data/ext/sparsehash-1.5.2/doc/performance.html +96 -0
- data/ext/sparsehash-1.5.2/doc/sparse_hash_map.html +1527 -0
- data/ext/sparsehash-1.5.2/doc/sparse_hash_set.html +1376 -0
- data/ext/sparsehash-1.5.2/doc/sparsetable.html +1393 -0
- data/ext/sparsehash-1.5.2/experimental/Makefile +9 -0
- data/ext/sparsehash-1.5.2/experimental/README +14 -0
- data/ext/sparsehash-1.5.2/experimental/example.c +54 -0
- data/ext/sparsehash-1.5.2/experimental/libchash.c +1537 -0
- data/ext/sparsehash-1.5.2/experimental/libchash.h +252 -0
- data/ext/sparsehash-1.5.2/google-sparsehash.sln +47 -0
- data/ext/sparsehash-1.5.2/install-sh +323 -0
- data/ext/sparsehash-1.5.2/m4/acx_pthread.m4 +363 -0
- data/ext/sparsehash-1.5.2/m4/google_namespace.m4 +42 -0
- data/ext/sparsehash-1.5.2/m4/namespaces.m4 +15 -0
- data/ext/sparsehash-1.5.2/m4/stl_hash.m4 +70 -0
- data/ext/sparsehash-1.5.2/m4/stl_hash_fun.m4 +36 -0
- data/ext/sparsehash-1.5.2/m4/stl_namespace.m4 +25 -0
- data/ext/sparsehash-1.5.2/missing +360 -0
- data/ext/sparsehash-1.5.2/mkinstalldirs +158 -0
- data/ext/sparsehash-1.5.2/packages/deb.sh +74 -0
- data/ext/sparsehash-1.5.2/packages/deb/README +7 -0
- data/ext/sparsehash-1.5.2/packages/deb/changelog +107 -0
- data/ext/sparsehash-1.5.2/packages/deb/compat +1 -0
- data/ext/sparsehash-1.5.2/packages/deb/control +17 -0
- data/ext/sparsehash-1.5.2/packages/deb/copyright +35 -0
- data/ext/sparsehash-1.5.2/packages/deb/docs +16 -0
- data/ext/sparsehash-1.5.2/packages/deb/rules +117 -0
- data/ext/sparsehash-1.5.2/packages/deb/sparsehash.dirs +2 -0
- data/ext/sparsehash-1.5.2/packages/deb/sparsehash.install +2 -0
- data/ext/sparsehash-1.5.2/packages/rpm.sh +86 -0
- data/ext/sparsehash-1.5.2/packages/rpm/rpm.spec +61 -0
- data/ext/sparsehash-1.5.2/src/config.h.in +131 -0
- data/ext/sparsehash-1.5.2/src/config.h.include +23 -0
- data/ext/sparsehash-1.5.2/src/google/dense_hash_map +310 -0
- data/ext/sparsehash-1.5.2/src/google/dense_hash_set +287 -0
- data/ext/sparsehash-1.5.2/src/google/sparse_hash_map +294 -0
- data/ext/sparsehash-1.5.2/src/google/sparse_hash_set +275 -0
- data/ext/sparsehash-1.5.2/src/google/sparsehash/densehashtable.h +1062 -0
- data/ext/sparsehash-1.5.2/src/google/sparsehash/sparsehashtable.h +1015 -0
- data/ext/sparsehash-1.5.2/src/google/sparsetable +1468 -0
- data/ext/sparsehash-1.5.2/src/google/type_traits.h +250 -0
- data/ext/sparsehash-1.5.2/src/hashtable_unittest.cc +1375 -0
- data/ext/sparsehash-1.5.2/src/simple_test.cc +103 -0
- data/ext/sparsehash-1.5.2/src/sparsetable_unittest.cc +696 -0
- data/ext/sparsehash-1.5.2/src/time_hash_map.cc +488 -0
- data/ext/sparsehash-1.5.2/src/type_traits_unittest.cc +492 -0
- data/ext/sparsehash-1.5.2/src/windows/config.h +149 -0
- data/ext/sparsehash-1.5.2/src/windows/google/sparsehash/sparseconfig.h +32 -0
- data/ext/sparsehash-1.5.2/src/windows/port.cc +63 -0
- data/ext/sparsehash-1.5.2/src/windows/port.h +81 -0
- data/ext/sparsehash-1.5.2/src/words +8944 -0
- data/ext/sparsehash-1.5.2/vsprojects/hashtable_unittest/hashtable_unittest.vcproj +187 -0
- data/ext/sparsehash-1.5.2/vsprojects/sparsetable_unittest/sparsetable_unittest.vcproj +172 -0
- data/ext/sparsehash-1.5.2/vsprojects/time_hash_map/time_hash_map.vcproj +187 -0
- data/ext/sparsehash-1.5.2/vsprojects/type_traits_unittest/type_traits_unittest.vcproj +169 -0
- data/ext/test.rb +10 -0
- data/test/spec.go +70 -0
- metadata +147 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/bash -e
|
|
2
|
+
|
|
3
|
+
# This takes one commandline argument, the name of the package. If no
|
|
4
|
+
# name is given, then we'll end up just using the name associated with
|
|
5
|
+
# an arbitrary .tar.gz file in the rootdir. That's fine: there's probably
|
|
6
|
+
# only one.
|
|
7
|
+
#
|
|
8
|
+
# Run this from the 'packages' directory, just under rootdir
|
|
9
|
+
|
|
10
|
+
## Set LIB to lib if exporting a library, empty-string else
|
|
11
|
+
LIB=
|
|
12
|
+
#LIB=lib
|
|
13
|
+
|
|
14
|
+
PACKAGE="$1"
|
|
15
|
+
VERSION="$2"
|
|
16
|
+
|
|
17
|
+
# We can only build Debian packages, if the Debian build tools are installed
|
|
18
|
+
if [ \! -x /usr/bin/debuild ]; then
|
|
19
|
+
echo "Cannot find /usr/bin/debuild. Not building Debian packages." 1>&2
|
|
20
|
+
exit 0
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Double-check we're in the packages directory, just under rootdir
|
|
24
|
+
if [ \! -r ../Makefile -a \! -r ../INSTALL ]; then
|
|
25
|
+
echo "Must run $0 in the 'packages' directory, under the root directory." 1>&2
|
|
26
|
+
echo "Also, you must run \"make dist\" before running this script." 1>&2
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Find the top directory for this package
|
|
31
|
+
topdir="${PWD%/*}"
|
|
32
|
+
|
|
33
|
+
# Find the tar archive built by "make dist"
|
|
34
|
+
archive="${PACKAGE}-${VERSION}"
|
|
35
|
+
archive_with_underscore="${PACKAGE}_${VERSION}"
|
|
36
|
+
if [ -z "${archive}" ]; then
|
|
37
|
+
echo "Cannot find ../$PACKAGE*.tar.gz. Run \"make dist\" first." 1>&2
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Create a pristine directory for building the Debian package files
|
|
42
|
+
trap 'rm -rf '`pwd`/tmp'; exit $?' EXIT SIGHUP SIGINT SIGTERM
|
|
43
|
+
|
|
44
|
+
rm -rf tmp
|
|
45
|
+
mkdir -p tmp
|
|
46
|
+
cd tmp
|
|
47
|
+
|
|
48
|
+
# Debian has very specific requirements about the naming of build
|
|
49
|
+
# directories, and tar archives. It also wants to write all generated
|
|
50
|
+
# packages to the parent of the source directory. We accommodate these
|
|
51
|
+
# requirements by building directly from the tar file.
|
|
52
|
+
ln -s "${topdir}/${archive}.tar.gz" "${LIB}${archive}.orig.tar.gz"
|
|
53
|
+
# Some version of debuilder want foo.orig.tar.gz with _ between versions.
|
|
54
|
+
ln -s "${topdir}/${archive}.tar.gz" "${LIB}${archive_with_underscore}.orig.tar.gz"
|
|
55
|
+
tar zfx "${LIB}${archive}.orig.tar.gz"
|
|
56
|
+
[ -n "${LIB}" ] && mv "${archive}" "${LIB}${archive}"
|
|
57
|
+
cd "${LIB}${archive}"
|
|
58
|
+
# This is one of those 'specific requirements': where the deb control files live
|
|
59
|
+
cp -a "packages/deb" "debian"
|
|
60
|
+
|
|
61
|
+
# Now, we can call Debian's standard build tool
|
|
62
|
+
debuild -uc -us
|
|
63
|
+
cd ../.. # get back to the original top-level dir
|
|
64
|
+
|
|
65
|
+
# We'll put the result in a subdirectory that's named after the OS version
|
|
66
|
+
# we've made this .deb file for.
|
|
67
|
+
destdir="debian-$(cat /etc/debian_version 2>/dev/null || echo UNKNOWN)"
|
|
68
|
+
|
|
69
|
+
rm -rf "$destdir"
|
|
70
|
+
mkdir -p "$destdir"
|
|
71
|
+
mv $(find tmp -mindepth 1 -maxdepth 1 -type f) "$destdir"
|
|
72
|
+
|
|
73
|
+
echo
|
|
74
|
+
echo "The Debian package files are located in $PWD/$destdir"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
The list of files here isn't complete. For a step-by-step guide on
|
|
2
|
+
how to set this package up correctly, check out
|
|
3
|
+
http://www.debian.org/doc/maint-guide/
|
|
4
|
+
|
|
5
|
+
Most of the files that are in this directory are boilerplate.
|
|
6
|
+
However, you may need to change the list of binary-arch dependencies
|
|
7
|
+
in 'rules'.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
sparsehash (1.5.2-1) unstable; urgency=low
|
|
2
|
+
|
|
3
|
+
* New upstream release.
|
|
4
|
+
|
|
5
|
+
-- Google Inc. <opensource@google.com> Tue, 12 May 2009 14:16:38 -0700
|
|
6
|
+
|
|
7
|
+
sparsehash (1.5.1-1) unstable; urgency=low
|
|
8
|
+
|
|
9
|
+
* New upstream release.
|
|
10
|
+
|
|
11
|
+
-- Google Inc. <opensource@google.com> Fri, 08 May 2009 15:23:44 -0700
|
|
12
|
+
|
|
13
|
+
sparsehash (1.5-1) unstable; urgency=low
|
|
14
|
+
|
|
15
|
+
* New upstream release.
|
|
16
|
+
|
|
17
|
+
-- Google Inc. <opensource@google.com> Wed, 06 May 2009 11:28:49 -0700
|
|
18
|
+
|
|
19
|
+
sparsehash (1.4-1) unstable; urgency=low
|
|
20
|
+
|
|
21
|
+
* New upstream release.
|
|
22
|
+
|
|
23
|
+
-- Google Inc. <opensource@google.com> Wed, 28 Jan 2009 17:11:31 -0800
|
|
24
|
+
|
|
25
|
+
sparsehash (1.3-1) unstable; urgency=low
|
|
26
|
+
|
|
27
|
+
* New upstream release.
|
|
28
|
+
|
|
29
|
+
-- Google Inc. <opensource@google.com> Thu, 06 Nov 2008 15:06:09 -0800
|
|
30
|
+
|
|
31
|
+
sparsehash (1.2-1) unstable; urgency=low
|
|
32
|
+
|
|
33
|
+
* New upstream release.
|
|
34
|
+
|
|
35
|
+
-- Google Inc. <opensource@google.com> Thu, 18 Sep 2008 13:53:20 -0700
|
|
36
|
+
|
|
37
|
+
sparsehash (1.1-1) unstable; urgency=low
|
|
38
|
+
|
|
39
|
+
* New upstream release.
|
|
40
|
+
|
|
41
|
+
-- Google Inc. <opensource@google.com> Mon, 11 Feb 2008 16:30:11 -0800
|
|
42
|
+
|
|
43
|
+
sparsehash (1.0-1) unstable; urgency=low
|
|
44
|
+
|
|
45
|
+
* New upstream release. We are now out of beta.
|
|
46
|
+
|
|
47
|
+
-- Google Inc. <opensource@google.com> Tue, 13 Nov 2007 15:15:46 -0800
|
|
48
|
+
|
|
49
|
+
sparsehash (0.9.1-1) unstable; urgency=low
|
|
50
|
+
|
|
51
|
+
* New upstream release.
|
|
52
|
+
|
|
53
|
+
-- Google Inc. <opensource@google.com> Fri, 12 Oct 2007 12:35:24 -0700
|
|
54
|
+
|
|
55
|
+
sparsehash (0.9-1) unstable; urgency=low
|
|
56
|
+
|
|
57
|
+
* New upstream release.
|
|
58
|
+
|
|
59
|
+
-- Google Inc. <opensource@google.com> Tue, 09 Oct 2007 14:15:21 -0700
|
|
60
|
+
|
|
61
|
+
sparsehash (0.8-1) unstable; urgency=low
|
|
62
|
+
|
|
63
|
+
* New upstream release.
|
|
64
|
+
|
|
65
|
+
-- Google Inc. <opensource@google.com> Tue, 03 Jul 2007 12:55:04 -0700
|
|
66
|
+
|
|
67
|
+
sparsehash (0.7-1) unstable; urgency=low
|
|
68
|
+
|
|
69
|
+
* New upstream release.
|
|
70
|
+
|
|
71
|
+
-- Google Inc. <opensource@google.com> Mon, 11 Jun 2007 11:33:41 -0700
|
|
72
|
+
|
|
73
|
+
sparsehash (0.6-1) unstable; urgency=low
|
|
74
|
+
|
|
75
|
+
* New upstream release.
|
|
76
|
+
|
|
77
|
+
-- Google Inc. <opensource@google.com> Tue, 20 Mar 2007 17:29:34 -0700
|
|
78
|
+
|
|
79
|
+
sparsehash (0.5-1) unstable; urgency=low
|
|
80
|
+
|
|
81
|
+
* New upstream release.
|
|
82
|
+
|
|
83
|
+
-- Google Inc. <opensource@google.com> Sat, 21 Oct 2006 13:47:47 -0700
|
|
84
|
+
|
|
85
|
+
sparsehash (0.4-1) unstable; urgency=low
|
|
86
|
+
|
|
87
|
+
* New upstream release.
|
|
88
|
+
|
|
89
|
+
-- Google Inc. <opensource@google.com> Sun, 23 Apr 2006 22:42:35 -0700
|
|
90
|
+
|
|
91
|
+
sparsehash (0.3-1) unstable; urgency=low
|
|
92
|
+
|
|
93
|
+
* New upstream release.
|
|
94
|
+
|
|
95
|
+
-- Google Inc. <opensource@google.com> Thu, 03 Nov 2005 20:12:31 -0800
|
|
96
|
+
|
|
97
|
+
sparsehash (0.2-1) unstable; urgency=low
|
|
98
|
+
|
|
99
|
+
* New upstream release.
|
|
100
|
+
|
|
101
|
+
-- Google Inc. <opensource@google.com> Mon, 02 May 2005 07:04:46 -0700
|
|
102
|
+
|
|
103
|
+
sparsehash (0.1-1) unstable; urgency=low
|
|
104
|
+
|
|
105
|
+
* Initial release.
|
|
106
|
+
|
|
107
|
+
-- Google Inc. <opensource@google.com> Tue, 15 Feb 2005 07:17:02 -0800
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Source: sparsehash
|
|
2
|
+
Section: libdevel
|
|
3
|
+
Priority: optional
|
|
4
|
+
Maintainer: Google Inc. <opensource@google.com>
|
|
5
|
+
Build-Depends: debhelper (>= 4.0.0)
|
|
6
|
+
Standards-Version: 3.6.1
|
|
7
|
+
|
|
8
|
+
Package: sparsehash
|
|
9
|
+
Section: libs
|
|
10
|
+
Architecture: any
|
|
11
|
+
Description: hash_map and hash_set classes with minimal space overhead
|
|
12
|
+
This package contains several hash-map implementations, similar
|
|
13
|
+
in API to SGI's hash_map class, but with different performance
|
|
14
|
+
characteristics. sparse_hash_map uses very little space overhead: 1-2
|
|
15
|
+
bits per entry. dense_hash_map is typically faster than the default
|
|
16
|
+
SGI STL implementation. This package also includes hash-set analogues
|
|
17
|
+
of these classes.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
This package was debianized by Google Inc. <opensource@google.com> on
|
|
2
|
+
15 February 2005.
|
|
3
|
+
|
|
4
|
+
It was downloaded from http://code.google.com/
|
|
5
|
+
|
|
6
|
+
Upstream Author: opensource@google.com
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2005, Google Inc.
|
|
9
|
+
All rights reserved.
|
|
10
|
+
|
|
11
|
+
Redistribution and use in source and binary forms, with or without
|
|
12
|
+
modification, are permitted provided that the following conditions are
|
|
13
|
+
met:
|
|
14
|
+
|
|
15
|
+
* Redistributions of source code must retain the above copyright
|
|
16
|
+
notice, this list of conditions and the following disclaimer.
|
|
17
|
+
* Redistributions in binary form must reproduce the above
|
|
18
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
19
|
+
in the documentation and/or other materials provided with the
|
|
20
|
+
distribution.
|
|
21
|
+
* Neither the name of Google Inc. nor the names of its
|
|
22
|
+
contributors may be used to endorse or promote products derived from
|
|
23
|
+
this software without specific prior written permission.
|
|
24
|
+
|
|
25
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
26
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
27
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
28
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
29
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
30
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
31
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
32
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
33
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
34
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
35
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
AUTHORS
|
|
2
|
+
COPYING
|
|
3
|
+
ChangeLog
|
|
4
|
+
INSTALL
|
|
5
|
+
NEWS
|
|
6
|
+
README
|
|
7
|
+
TODO
|
|
8
|
+
doc/dense_hash_map.html
|
|
9
|
+
doc/dense_hash_set.html
|
|
10
|
+
doc/sparse_hash_map.html
|
|
11
|
+
doc/sparse_hash_set.html
|
|
12
|
+
doc/sparsetable.html
|
|
13
|
+
doc/implementation.html
|
|
14
|
+
doc/performance.html
|
|
15
|
+
doc/index.html
|
|
16
|
+
doc/designstyle.css
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
#!/usr/bin/make -f
|
|
2
|
+
# -*- makefile -*-
|
|
3
|
+
# Sample debian/rules that uses debhelper.
|
|
4
|
+
# This file was originally written by Joey Hess and Craig Small.
|
|
5
|
+
# As a special exception, when this file is copied by dh-make into a
|
|
6
|
+
# dh-make output file, you may use that output file without restriction.
|
|
7
|
+
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
8
|
+
|
|
9
|
+
# Uncomment this to turn on verbose mode.
|
|
10
|
+
#export DH_VERBOSE=1
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# These are used for cross-compiling and for saving the configure script
|
|
14
|
+
# from having to guess our platform (since we know it already)
|
|
15
|
+
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
16
|
+
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
CFLAGS = -Wall -g
|
|
20
|
+
|
|
21
|
+
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
|
22
|
+
CFLAGS += -O0
|
|
23
|
+
else
|
|
24
|
+
CFLAGS += -O2
|
|
25
|
+
endif
|
|
26
|
+
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
27
|
+
INSTALL_PROGRAM += -s
|
|
28
|
+
endif
|
|
29
|
+
|
|
30
|
+
# shared library versions, option 1
|
|
31
|
+
#version=2.0.5
|
|
32
|
+
#major=2
|
|
33
|
+
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
|
|
34
|
+
version=`ls src/.libs/lib*.so.* | \
|
|
35
|
+
awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
|
|
36
|
+
major=`ls src/.libs/lib*.so.* | \
|
|
37
|
+
awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
|
|
38
|
+
|
|
39
|
+
config.status: configure
|
|
40
|
+
dh_testdir
|
|
41
|
+
# Add here commands to configure the package.
|
|
42
|
+
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
build: build-stamp
|
|
46
|
+
build-stamp: config.status
|
|
47
|
+
dh_testdir
|
|
48
|
+
|
|
49
|
+
# Add here commands to compile the package.
|
|
50
|
+
$(MAKE)
|
|
51
|
+
|
|
52
|
+
touch build-stamp
|
|
53
|
+
|
|
54
|
+
clean:
|
|
55
|
+
dh_testdir
|
|
56
|
+
dh_testroot
|
|
57
|
+
rm -f build-stamp
|
|
58
|
+
|
|
59
|
+
# Add here commands to clean up after the build process.
|
|
60
|
+
-$(MAKE) distclean
|
|
61
|
+
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
|
62
|
+
cp -f /usr/share/misc/config.sub config.sub
|
|
63
|
+
endif
|
|
64
|
+
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
|
65
|
+
cp -f /usr/share/misc/config.guess config.guess
|
|
66
|
+
endif
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
dh_clean
|
|
70
|
+
|
|
71
|
+
install: build
|
|
72
|
+
dh_testdir
|
|
73
|
+
dh_testroot
|
|
74
|
+
dh_clean -k
|
|
75
|
+
dh_installdirs
|
|
76
|
+
|
|
77
|
+
# Add here commands to install the package into debian/tmp
|
|
78
|
+
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# Build architecture-independent files here.
|
|
82
|
+
binary-indep: build install
|
|
83
|
+
# We have nothing to do by default.
|
|
84
|
+
|
|
85
|
+
# Build architecture-dependent files here.
|
|
86
|
+
binary-arch: build install
|
|
87
|
+
dh_testdir
|
|
88
|
+
dh_testroot
|
|
89
|
+
dh_installchangelogs ChangeLog
|
|
90
|
+
dh_installdocs
|
|
91
|
+
dh_installexamples
|
|
92
|
+
dh_install --sourcedir=debian/tmp
|
|
93
|
+
# dh_installmenu
|
|
94
|
+
# dh_installdebconf
|
|
95
|
+
# dh_installlogrotate
|
|
96
|
+
# dh_installemacsen
|
|
97
|
+
# dh_installpam
|
|
98
|
+
# dh_installmime
|
|
99
|
+
# dh_installinit
|
|
100
|
+
# dh_installcron
|
|
101
|
+
# dh_installinfo
|
|
102
|
+
dh_installman
|
|
103
|
+
dh_link
|
|
104
|
+
dh_strip
|
|
105
|
+
dh_compress
|
|
106
|
+
dh_fixperms
|
|
107
|
+
# dh_perl
|
|
108
|
+
# dh_python
|
|
109
|
+
dh_makeshlibs
|
|
110
|
+
dh_installdeb
|
|
111
|
+
dh_shlibdeps
|
|
112
|
+
dh_gencontrol
|
|
113
|
+
dh_md5sums
|
|
114
|
+
dh_builddeb
|
|
115
|
+
|
|
116
|
+
binary: binary-indep binary-arch
|
|
117
|
+
.PHONY: build clean binary-indep binary-arch binary install
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/bin/sh -e
|
|
2
|
+
|
|
3
|
+
# Run this from the 'packages' directory, just under rootdir
|
|
4
|
+
|
|
5
|
+
# We can only build rpm packages, if the rpm build tools are installed
|
|
6
|
+
if [ \! -x /usr/bin/rpmbuild ]
|
|
7
|
+
then
|
|
8
|
+
echo "Cannot find /usr/bin/rpmbuild. Not building an rpm." 1>&2
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Check the commandline flags
|
|
13
|
+
PACKAGE="$1"
|
|
14
|
+
VERSION="$2"
|
|
15
|
+
fullname="${PACKAGE}-${VERSION}"
|
|
16
|
+
archive=../$fullname.tar.gz
|
|
17
|
+
|
|
18
|
+
if [ -z "$1" -o -z "$2" ]
|
|
19
|
+
then
|
|
20
|
+
echo "Usage: $0 <package name> <package version>" 1>&2
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# Double-check we're in the packages directory, just under rootdir
|
|
25
|
+
if [ \! -r ../Makefile -a \! -r ../INSTALL ]
|
|
26
|
+
then
|
|
27
|
+
echo "Must run $0 in the 'packages' directory, under the root directory." 1>&2
|
|
28
|
+
echo "Also, you must run \"make dist\" before running this script." 1>&2
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
if [ \! -r "$archive" ]
|
|
33
|
+
then
|
|
34
|
+
echo "Cannot find $archive. Run \"make dist\" first." 1>&2
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# Create the directory where the input lives, and where the output should live
|
|
39
|
+
RPM_SOURCE_DIR="/tmp/rpmsource-$fullname"
|
|
40
|
+
RPM_BUILD_DIR="/tmp/rpmbuild-$fullname"
|
|
41
|
+
|
|
42
|
+
trap 'rm -rf $RPM_SOURCE_DIR $RPM_BUILD_DIR; exit $?' EXIT SIGHUP SIGINT SIGTERM
|
|
43
|
+
|
|
44
|
+
rm -rf "$RPM_SOURCE_DIR" "$RPM_BUILD_DIR"
|
|
45
|
+
mkdir "$RPM_SOURCE_DIR"
|
|
46
|
+
mkdir "$RPM_BUILD_DIR"
|
|
47
|
+
|
|
48
|
+
cp "$archive" "$RPM_SOURCE_DIR"
|
|
49
|
+
|
|
50
|
+
# rpmbuild -- as far as I can tell -- asks the OS what CPU it has.
|
|
51
|
+
# This may differ from what kind of binaries gcc produces. dpkg
|
|
52
|
+
# does a better job of this, so if we can run 'dpkg --print-architecture'
|
|
53
|
+
# to get the build CPU, we use that in preference of the rpmbuild
|
|
54
|
+
# default.
|
|
55
|
+
target=`dpkg --print-architecture 2>/dev/null` # "" if dpkg isn't found
|
|
56
|
+
if [ -n "$target" ]
|
|
57
|
+
then
|
|
58
|
+
target=" --target $target"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
rpmbuild -bb rpm/rpm.spec $target \
|
|
62
|
+
--define "NAME $PACKAGE" \
|
|
63
|
+
--define "VERSION $VERSION" \
|
|
64
|
+
--define "_sourcedir $RPM_SOURCE_DIR" \
|
|
65
|
+
--define "_builddir $RPM_BUILD_DIR" \
|
|
66
|
+
--define "_rpmdir $RPM_SOURCE_DIR"
|
|
67
|
+
|
|
68
|
+
# We put the output in a directory based on what system we've built for
|
|
69
|
+
destdir=rpm-unknown
|
|
70
|
+
if [ -r /etc/issue ]
|
|
71
|
+
then
|
|
72
|
+
grep "Red Hat.*release 7" /etc/issue >/dev/null 2>&1 && destdir=rh7
|
|
73
|
+
grep "Red Hat.*release 8" /etc/issue >/dev/null 2>&1 && destdir=rh8
|
|
74
|
+
grep "Red Hat.*release 9" /etc/issue >/dev/null 2>&1 && destdir=rh9
|
|
75
|
+
grep "Fedora Core.*release 1" /etc/issue >/dev/null 2>&1 && destdir=fc1
|
|
76
|
+
grep "Fedora Core.*release 2" /etc/issue >/dev/null 2>&1 && destdir=fc2
|
|
77
|
+
grep "Fedora Core.*release 3" /etc/issue >/dev/null 2>&1 && destdir=fc3
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
rm -rf "$destdir"
|
|
81
|
+
mkdir -p "$destdir"
|
|
82
|
+
# We want to get not only the main package but devel etc, hence the middle *
|
|
83
|
+
mv "$RPM_SOURCE_DIR"/*/"${PACKAGE}"-*"${VERSION}"*.rpm "$destdir"
|
|
84
|
+
|
|
85
|
+
echo
|
|
86
|
+
echo "The rpm package file(s) are located in $PWD/$destdir"
|