Skip to content
This repository has been archived by the owner on Dec 20, 2017. It is now read-only.

Commit

Permalink
Merge pull request #19 from icesparrow/debian-packaging
Browse files Browse the repository at this point in the history
Functionality to build .deb packages
  • Loading branch information
nkeynes-oracle committed Jun 30, 2017
2 parents 936f702 + 567cfbb commit 3d37ebc
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ prof/build
prof/com
prof/souffleprof.jar
warn.log
debian/changelog
packaging/*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
dist: trusty
language: cpp
before_install:
before_install:
- sudo apt-get -qq update
- sudo apt-get -y install bison
- sudo apt-get -y install bison flex build-essential
script: ./bootstrap && ./configure && make && make check
19 changes: 18 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,21 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
# IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SUBDIRS = src tests prof
SUBDIRS = src tests prof

# Debian packaging
dpkg_dir = packaging
dist_src = $(distdir).tar.gz
deb_src = $(PACKAGE)_$(VERSION).orig.tar.gz

deb-package: dist
@which "$(DEBUILD)" 2>&1 > /dev/null || { echo "No debuild executable found" 1>&2 && exit 1; }
rm -rf $(dpkg_dir)
$(MKDIR_P) $(dpkg_dir)
tar -xzvf $(dist_src) -C $(dpkg_dir)
cp -r debian $(dpkg_dir)/$(distdir)
mv $(dist_src) $(dpkg_dir)/$(deb_src)
cd $(dpkg_dir)/$(distdir) && DEB_BUILD_OPTIONS=nocheck $(DEBUILD) -us -uc

clean-local:
-rm -rf $(dpkg_dir)
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ AS_IF([test -z "$SOUFFLECPP"], [AC_MSG_ERROR([cpp not found.])])
AC_CHECK_PROG(FLEX, flex, flex)
AS_IF([test -z "$FLEX"], [AC_MSG_ERROR([flex not found.])])

# Check for debuild
AC_CHECK_PROG(DEBUILD, debuild, debuild)

# Check for bison
AC_CHECK_PROG(BISON, bison, bison)
AS_IF([test -z "$BISON"], [AC_MSG_ERROR([bison not found.])])
Expand Down Expand Up @@ -131,4 +134,4 @@ AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_STRERROR_R
AC_CHECK_FUNCS([dup2 fchdir getcwd getpagesize gettimeofday isascii memset mkdir munmap pow regcomp rmdir setenv socket strcasecmp strchr strdup strerror strrchr strstr strtol strtoull])
AC_OUTPUT
AC_OUTPUT([debian/changelog])
5 changes: 5 additions & 0 deletions debian/changelog.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
souffle (@VERSION@-1) UNRELEASED; urgency=low

* Initial release

-- Nathan Keynes <nathan.keynes@oracle.com> Fri, 23 Jun 2017 17:25:32 +0000
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
19 changes: 19 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Source: souffle
Maintainer: Nathan Keynes <nathan.keynes@oracle.com>
Section: misc
Priority: optional
Standards-Version: 3.9.5
Build-Depends: autoconf, automake, bison (>= 3), debhelper (>= 9), flex, libsqlite3-dev, openjdk-7-jdk | openjdk-8-jdk
Homepage: https://github.com/oracle/souffle
Vcs-Git: https://github.com/oracle/souffle.git

Package: souffle
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, g++, jarwrapper, openjdk-7-jre | openjdk-8-jre
Description: Translator of declarative Datalog programs into the C++ language.
Soufflé is a translator of declarative Datalog programs into the C++ language.
Soufflé is used as a domain-specific language for static program analysis, over
large code bases with millions of lines of code. Soufflé aims to produce
high-performance C++ code that can be compiled with the native compiler on
the target machine.

25 changes: 25 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2016 Oracle and/or its affiliates. All Rights reserved

The Universal Permissive License (UPL), Version 1.0

Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software,
associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the
Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both

(a) the Software, and
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger
Work” to which the Software is contributed by such licensors),

without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and
distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the
Larger Work(s), and to sublicense the foregoing rights on either these or other terms.

This license is subject to the following condition:
The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/make -f
%:
dh $@

# debuild somehow finds /usr/local targets (which souffle does not use)
# and starts emitting warnings. The below code is to silence that.
override_dh_usrlocal:
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 3d37ebc

Please sign in to comment.