Skip to content

Commit c9b778f

Browse files
authored
Merge pull request #173 from DenverM80/update_readme_cmake
Update readme cmake
2 parents 64c3b6a + 4146256 commit c9b778f

File tree

1 file changed

+32
-33
lines changed

1 file changed

+32
-33
lines changed

README.md

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Contact Us
1010

1111
Join us at our [Google Groups](https://groups.google.com/d/forum/spectralogicds3-sdks) forum to ask questions, or see frequently asked questions.
1212

13+
Contribute
14+
==========
15+
16+
Pull requests are welcome, but first sign the [Contributor's
17+
Agreement](https://developer.spectralogic.com/contributors-agreement/)
18+
1319
Windows
1420
=======
1521

@@ -30,6 +36,8 @@ files:
3036
ds3\bin\libintl-8.dll
3137
ds3\bin\pthreadGC2.dll
3238
ds3\include\ds3.h
39+
ds3\include\ds3_string.h
40+
ds3\include\ds3_string_multimap.h
3341
ds3\lib\ds3.exp
3442
ds3\lib\ds3.lib
3543

@@ -44,17 +52,14 @@ Unix/Linux
4452

4553
For Unix/Linux we distribute the SDK as source code. The release tarballs
4654
contain a simple build script that should work on most Unix/Linux systems. The
47-
build system is currently autotools.
55+
build system is currently CMake.
56+
57+
To install CMake on Ubuntu use apt-get and install the following:
4858

49-
To install autotools on Ubuntu use apt-get and install the following:
59+
$ sudo apt-get install cmake
5060

51-
$ sudo apt-get install build-essential
52-
$ sudo apt-get install autoconf
53-
$ sudo apt-get install libtool
54-
55-
To install autotools on CentOS use yum and install the following:
56-
$ sudo yum install autoconf
57-
$ sudo yum install libtool
61+
To install CMake on CentOS use yum and install the following:
62+
$ sudo yum install cmake
5863

5964
The SDK depends upon several open source libraries, so you'll need to ensure
6065
that you've installed the development header packages for each of them. For
@@ -69,15 +74,15 @@ On Ubuntu you can install them with apt-get:
6974

7075
$ sudo apt-get install libxml2-dev
7176
$ sudo apt-get install libcurl4-openssl-dev
72-
$ sudo apt-get install libglib2.0-dev
73-
77+
$ sudo apt-get install libglib2.0-dev
78+
7479
On CentOS you can install them with yum:
7580

7681
$ sudo yum install libxml2-devel
7782
$ sudo yum install libcurl-devel
78-
$ sudo yum install glib2-devel
79-
80-
For testing you will need the boost unit test library as well.
83+
$ sudo yum install glib2-devel
84+
85+
For testing you will need the boost unit test library as well.
8186

8287
On Ubuntu this can be installed with:
8388

@@ -86,7 +91,7 @@ On Ubuntu this can be installed with:
8691
On CentOS this can be installed with:
8792

8893
$ sudo yum install boost-test
89-
94+
9095
Release Tarball
9196
---------------
9297

@@ -96,8 +101,7 @@ terminal window.
96101
$ cd directory/containing/release/tarball
97102
$ tar zxf ds3_c_sdk-{version}.tgz
98103
$ cd ds3_c_sdk-{version}
99-
$ autoreconf --install
100-
$ ./configure
104+
$ cmake .
101105
$ make
102106
$ su
103107
# make install
@@ -113,21 +117,16 @@ The `make install` command installs the following files on your system:
113117
{prefix}/lib/libds3.so.0.0.0
114118
{prefix}/include/ds3.h
115119

116-
The `./configure` command sets `{prefix}` to `/usr/local` by default. You can
117-
change this by running `./configure --prefix=/your/desired/prefix` instead of
118-
`./configure`.
119-
120120
GIT Clone
121121
---------
122122

123123
To build the SDK from a git clone you must have a relatively recent version of
124-
GNU autoutils installed. While the release tarball does contain the build
125-
scripts that autoutils generates, the git repository does not.
124+
GNU CMake installed. While the release tarball does contain the build
125+
scripts that CMake generates, the git repository does not.
126126

127-
Assuming you have autotools installed, you can execute `autoreconf --install`
128-
and then follow the same instructions as the tarball release.
127+
Assuming you have CMake installed, you can follow the same instructions as the tarball release.
129128

130-
Usage
129+
pkg-config Usage
131130
-----
132131

133132
The SDK provides a pkg-config definition, so you can determine the proper
@@ -149,7 +148,7 @@ To build the sample, use the following commands:
149148
$ cd sample
150149
$ make deps # Builds the SDK and installs it into directory/containing/source/tree**/install**
151150
$ make
152-
151+
153152
To run it, first ensure that DS3_ACCESS_KEY, DS3_SECRET_KEY, DS3_ENDPOINT (and optionally http:proxy) are set in environment variables to match the target device. For the simulator, see [Installation Instructions] (https://developer.spectralogic.com/sim-install/)
154153

155154
$ make run-put-bulk # create "books" bucket and put files into it
@@ -231,12 +230,12 @@ The next demonstrates how to create a new bucket:
231230
int main (int args, char * argv[]) {
232231
ds3_creds * creds = ds3_create_creds("cnlhbg==","ZIjGDQAs");
233232
ds3_client * client = ds3_create_client("http://192.168.56.101:8080", creds);
234-
233+
235234
char * bucket = "books";
236235
ds3_request * create_bucket_request = ds3_init_put_bucket_request(bucket_name);
237236
ds3_error* error = ds3_put_bucket_request(client, create_bucket_request);
238237
ds3_request_free(create_bucket_request);
239-
238+
240239
if(error != NULL) {
241240
if(error->error != NULL) {
242241
printf("Failed to create bucket with error (%lu): %s\n", error->error->http_error_code, error->message->value);
@@ -250,7 +249,7 @@ int main (int args, char * argv[]) {
250249
ds3_free_creds(creds);
251250
ds3_free_client(client);
252251
return 1;
253-
}
252+
}
254253
255254
printf("Successfully created bucket: %s\n", bucket);
256255
ds3_free_creds(creds);
@@ -271,7 +270,7 @@ The following is an example of performing a get bucket:
271270
#include "ds3.h"
272271

273272
int main (int args, char * argv[]) {
274-
ds3_list_bucket_result_response* response;
273+
ds3_list_bucket_result_response* response;
275274
uint64_t i;
276275

277276
// Setup client credentials and then the actual client itself.
@@ -307,7 +306,7 @@ int main (int args, char * argv[]) {
307306
ds3_creds_free(creds);
308307
ds3_client_free(client);
309308
return 1;
310-
}
309+
}
311310

312311
if (response == NULL) {
313312
printf("Response was null\n");
@@ -334,7 +333,7 @@ int main (int args, char * argv[]) {
334333
ds3_creds_free(creds);
335334
ds3_client_free(client);
336335
ds3_cleanup();
337-
return 0;
336+
return 0;
338337
}
339338
```
340339

0 commit comments

Comments
 (0)