Skip to content

Commit

Permalink
Make the build procedure on unix and windows more consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
chirino committed Aug 23, 2012
1 parent 933ec6a commit a65428d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
4 changes: 2 additions & 2 deletions leveldbjni-linux32/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
<type>zip</type>
</nativeSrcDependency>
<configureArgs>
<arg>--with-leveldb=${leveldb}</arg>
<arg>--with-snappy=${snappy}</arg>
<arg>--with-leveldb=${env.LEVELDB_HOME}</arg>
<arg>--with-snappy=${env.SNAPPY_HOME}</arg>
</configureArgs>
</configuration>
</plugin>
Expand Down
4 changes: 2 additions & 2 deletions leveldbjni-linux64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
<type>zip</type>
</nativeSrcDependency>
<configureArgs>
<arg>--with-leveldb=${leveldb}</arg>
<arg>--with-snappy=${snappy}</arg>
<arg>--with-leveldb=${env.LEVELDB_HOME}</arg>
<arg>--with-snappy=${env.SNAPPY_HOME}</arg>
</configureArgs>
</configuration>
</plugin>
Expand Down
6 changes: 2 additions & 4 deletions leveldbjni-osx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@
</nativeSrcDependency>
<platform>osx</platform>
<configureArgs>
<arg>--with-leveldb=${leveldb}</arg>
<arg>--with-snappy=${snappy}</arg>
<arg>--with-leveldb=${env.LEVELDB_HOME}</arg>
<arg>--with-snappy=${env.SNAPPY_HOME}</arg>
<arg>--with-universal</arg>
<arg>--with-leveldb=${leveldb}</arg>
<arg>--with-snappy=${snappy}</arg>
</configureArgs>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,19 +396,21 @@ public void testCompactRanges() throws IOException, InterruptedException, DBExce
}

String stats = db.getProperty("leveldb.stats");
System.out.println(stats);

// Compactions
// Level Files Size(MB) Time(sec) Read(MB) Write(MB)
// --------------------------------------------------
assertTrue(stats.contains("1 2 2 0 0 2"));
assertTrue(stats.contains("2 1 1 0 0 1"));
assertTrue(stats.contains("1 2 8 0 0 8"));
assertTrue(stats.contains("2 1 4 0 0 4"));

// After the compaction, level 1 and 2 should not have any files in it..
((JniDB) db).compactRange(null, null);

stats = db.getProperty("leveldb.stats");
assertTrue(stats.contains("1 0 0 0 3 2"));
assertTrue(stats.contains("2 0 0 0 1 1"));
System.out.println(stats);
assertTrue(stats.contains("1 0 0 0 11 8"));
assertTrue(stats.contains("2 0 0 0 4 4"));

}
db.close();
Expand Down
5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@
</modules>
</profile>
<profile>
<id>mac</id>
<!-- <activation>
<os><family>mac</family></os>
</activation> -->
<id>osx</id>
<modules>
<module>leveldbjni-osx</module>
</modules>
Expand Down
8 changes: 6 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,17 @@ Patch and Compile the leveldb project. This produces a static library.
Now use maven to build the leveldbjni project.

cd ../leveldbjni
mvn clean install -Dleveldb=`cd ../leveldb; pwd` -Dsnappy=`cd ../snappy-1.0.5; pwd` -P download -P ${platform}
export LEVELDB_HOME=`cd ../leveldb; pwd`
export SNAPPY_HOME=`cd ../snappy-1.0.5; pwd`
mvn clean install -P download -P ${platform}

Replace ${platform} with one of the following platform identifiers (depending on the platform your building on):

* osx
* linux32
* linux64
* mac
* win32
* win64

If your platform does not have the right auto-tools levels available
just copy the `leveldbjni-${version}-SNAPSHOT-native-src.zip` artifact
Expand Down

0 comments on commit a65428d

Please sign in to comment.