Skip to content

Commit

Permalink
Add debian package and template for rpm package
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbes committed Oct 27, 2015
1 parent 9b058fd commit 4079ea2
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 0 deletions.
5 changes: 5 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarantool-modulekit/
files
stamp-*
*.substvars
*.log
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
small (1.0.0-1) unstable; urgency=low

* Initial release

-- Eugine Blikh <[email protected]> Wed, 16 Sep 2015 11:30:00 +0300
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
36 changes: 36 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Source: small
Priority: optional
Section: libdevel
Maintainer: Eugine Blikh <[email protected]>
#Build-Depends: debhelper (>= 9), cdbs, dpkg-dev (>= 1.16.1~)
Build-Depends: debhelper (>= 9), cdbs, cmake (>= 2.8), dpkg-dev (>= 1.16.1~)
Standards-Version: 3.9.5
Homepage: https://github.com/tarantool/small
Vcs-Git: git://github.com/tarantool/small.git
Vcs-Browser: https://github.com/tarantool/small

Package: libsmall
Architecture: any
Depends: tarantool, ${shlibs:Depends}, ${misc:Depends}
Pre-Depends: ${misc:Pre-Depends}
Description: specialized memory allocators
Collection of Specialized Memory ALLocators for small allocations

Package: libsmall-dbg
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: specialized memory allocators
Collection of Specialized Memory ALLocators for small allocations
.
This package contains debug information

Package: libsmall-dev
Architecture: any
Depends: tarantool, ${shlibs:Depends}, ${misc:Depends}
Pre-Depends: ${misc:Pre-Depends}
Description: specialized memory allocators
Collection of Specialized Memory ALLocators for small allocations
.
This package contains development files.
35 changes: 35 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Debianized-By: Eugine Blikh <[email protected]>
Upstream-Name: tarantool-small
Upstream-Contact: [email protected]
Source: https://github.com/tarantool/small

Files: *
Copyright: 2015 by Roman Tsisyk <[email protected]>
License: BSD-2-Clause
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
.
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
<COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
1 change: 1 addition & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
1 change: 1 addition & 0 deletions debian/libsmall-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/include/small/
2 changes: 2 additions & 0 deletions debian/libsmall.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/lib/libsmall.so*
usr/lib/libsmall.a
13 changes: 13 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/make -f

DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_BUILD_TYPE=Release

DEB_CMAKE_INSTALL_PREFIX := /usr
DEB_CMAKE_NORMAL_ARGS := \
-DCMAKE_INSTALL_PREFIX="$(DEB_CMAKE_INSTALL_PREFIX)" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_LIBDIR=/usr/lib

include /usr/share/cdbs/1/rules/debhelper.mk
# CMake is only needed for Lua/C and C modules
include /usr/share/cdbs/1/class/cmake.mk
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)
48 changes: 48 additions & 0 deletions rpm/small.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Name: small
Version: 1.0.0
Release: 1%{?dist}
Summary: Tarantool C connector
Group: Development/Languages
License: BSD
URL: https://github.com/tarantool/small
Source0: https://github.com/tarantool/small/archive/%{version}.tar.gz
# BuildRequires: cmake
# Strange bug.
# Fix according to http://www.jethrocarr.com/2012/05/23/bad-packaging-habits/
BuildRequires: cmake
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Vendor: tarantool.org
Group: Applications/Databases
%description
Collection of Specialized Memory ALLocators for small allocations

%package devel
Summary: Development files for C libtnt
Requires: small%{?_isa} = %{version}-%{release}
%description devel
Collection of Specialized Memory ALLocators for small allocations
This package contains development files.

##################################################################

%prep
%setup -c -q %{name}-%{version}

%build
cmake . -DCMAKE_INSTALL_LIBDIR='%{_libdir}' -DCMAKE_INSTALL_INCLUDEDIR='%{_includedir}' -DCMAKE_BUILD_TYPE='Release'
make

%install
make DESTDIR=%{buildroot} install

%files
"%{_libdir}/libsmall.a"
"%{_libdir}/libsmall.so*"

%files devel
%dir "%{_includedir}/small"
"%{_includedir}/small/*.h"

%changelog
* Oct 27 2015 Eugine Blikh <[email protected]> 1.0.0-1
- Initial version of the RPM spec

0 comments on commit 4079ea2

Please sign in to comment.