-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track scripts used for packaging (using the Opensuse Build Service).
- Loading branch information
1 parent
7193876
commit cc3a623
Showing
8 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
set(EXTRAS_FILES | ||
debian.control | ||
debian.rules | ||
libfruit.dsc | ||
libfruit.install | ||
libfruit.spec | ||
PKGBUILD | ||
) | ||
|
||
# This places configured files (build files with @FRUIT_VERSION@ replaced) in build/extras/built | ||
|
||
foreach(F ${EXTRAS_FILES}) | ||
configure_file(${F} built/${F} @ONLY) | ||
endforeach(F) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Maintainer: Marco Poletti <[email protected]> | ||
pkgname=libfruit | ||
pkgver=@FRUIT_VERSION@ | ||
pkgrel=0 | ||
pkgdesc="Fruit is a dependency injection framework for C++." | ||
url="https://github.com/google/fruit" | ||
arch=('x86_64' 'i686') | ||
license=('Apache') | ||
depends=('cmake' 'gcc>=4.8.1') | ||
optdepends=() | ||
makedepends=() | ||
conflicts=() | ||
replaces=() | ||
backup=() | ||
install='libfruit.install' | ||
source=("fruit-${pkgver}.tar.gz") | ||
md5sums=('d66cc12861e105cc38e5b878776f9f79') | ||
|
||
build() { | ||
cd "${srcdir}/fruit-${pkgver}" | ||
cmake -DCMAKE_INSTALL_PREFIX=/usr . | ||
make | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/fruit-${pkgver}" | ||
make DESTDIR="${pkgdir}" install | ||
} | ||
|
||
# vim:set ts=2 sw=2 et: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Source: libfruit | ||
Section: devel | ||
Priority: optional | ||
Maintainer: Marco Poletti <[email protected]> | ||
Build-Depends: debhelper (>= 4.1.16), cmake, gcc-4.8 (>= 4.8.1) | ||
|
||
Package: libfruit | ||
Architecture: any | ||
Depends: ${shlibs:Depends} | ||
Description: Dependency Injection Framework For C++ | ||
Fruit is a dependency injection framework for C++, loosely inspired by the | ||
Guice framework for Java. | ||
It uses C++ metaprogramming together with some new C++11 features to detect | ||
most injection problems at compile-time. | ||
|
||
Package: fruit-dev | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, libfruit | ||
Description: Dependency Injection Framework For C++ - Development files | ||
Fruit is a dependency injection framework for C++, loosely inspired by the | ||
Guice framework for Java. | ||
It uses C++ metaprogramming together with some new C++11 features to detect | ||
most injection problems at compile-time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/make -f | ||
|
||
# Uncomment this to turn on verbose mode. | ||
#export DH_VERBOSE=1 | ||
|
||
# This is the debhelper compatibility version to use. | ||
export DH_COMPAT=4 | ||
|
||
CFLAGS = -g | ||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | ||
CFLAGS += -O0 | ||
else | ||
CFLAGS += -O2 | ||
endif | ||
|
||
build: build-stamp | ||
build-stamp: | ||
dh_testdir | ||
|
||
cmake -DCMAKE_INSTALL_PREFIX=/usr | ||
make all | ||
|
||
touch build-stamp | ||
|
||
clean: | ||
dh_testdir | ||
dh_testroot | ||
rm -f build-stamp | ||
|
||
make clean || true | ||
|
||
dh_clean | ||
|
||
install: build | ||
dh_testdir | ||
dh_testroot | ||
dh_clean -k | ||
dh_installdirs | ||
|
||
make install DESTDIR=/usr/src/packages/BUILD/debian/libfruit | ||
|
||
# Build architecture-independent files here. | ||
binary-indep: build install | ||
# We have nothing to do by default. | ||
|
||
# Build architecture-dependent files here. | ||
binary-arch: build install | ||
dh_testdir | ||
dh_testroot | ||
# dh_installdebconf | ||
dh_installdocs | ||
dh_installexamples | ||
dh_installmenu | ||
# dh_installlogrotate | ||
# dh_installemacsen | ||
# dh_installpam | ||
# dh_installmime | ||
# dh_installinit | ||
dh_installcron | ||
dh_installman | ||
dh_installinfo | ||
# dh_undocumented | ||
dh_installchangelogs | ||
dh_link | ||
dh_strip | ||
dh_compress | ||
dh_fixperms | ||
# dh_makeshlibs | ||
dh_installdeb | ||
# dh_perl | ||
dh_shlibdeps | ||
dh_gencontrol | ||
dh_md5sums | ||
dh_builddeb | ||
|
||
binary: binary-indep binary-arch | ||
.PHONY: build clean binary-indep binary-arch binary install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Format: 1.0 | ||
Source: libfruit | ||
Version: @FRUIT_VERSION@-0 | ||
Binary: libfruit | ||
Maintainer: Marco Poletti <[email protected]> | ||
Architecture: any | ||
Build-Depends: debhelper (>= 4.1.16), cmake, gcc-4.8 (>= 4.8.1) | ||
Files: | ||
d57283ebb8157ae919762c58419353c8 133282 libfruit_@[email protected] | ||
2fecf324a32123b08cefc0f047bca5ee 63176 libfruit_@[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Intentionally empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# | ||
# spec file for package fruit | ||
# | ||
|
||
Name: libfruit | ||
Version: @FRUIT_VERSION@ | ||
Release: 0 | ||
Summary: Dependency Injection Framework For C++ | ||
License: Apache-2.0 | ||
Group: Development/Libraries/C and C++ | ||
Url: https://github.com/google/fruit | ||
Source0: fruit-%{version}.tar.gz | ||
|
||
BuildRequires: cmake | ||
|
||
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} | ||
BuildRequires: gcc-c++ >= 4.8.1 | ||
%else | ||
# OpenSUSE doesn't include the bugfix release version component in the package version. | ||
BuildRequires: gcc-c++ >= 4.8 | ||
%endif | ||
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-build | ||
|
||
%description | ||
Fruit is a dependency injection framework for C++, loosely inspired by the | ||
Guice framework for Java. | ||
It uses C++ metaprogramming together with some new C++11 features to detect | ||
most injection problems at compile-time. | ||
|
||
%package devel | ||
Summary: Dependency Injection Framework For C++ - Development Files | ||
License: Apache-2.0 | ||
Group: Development/Libraries/C and C++ | ||
Url: https://github.com/google/fruit | ||
Requires: libfruit = %{version} | ||
|
||
%description devel | ||
Fruit is a dependency injection framework for C++, loosely inspired by the | ||
Guice framework for Java. | ||
It uses C++ metaprogramming together with some new C++11 features to detect | ||
most injection problems at compile-time. | ||
|
||
%prep | ||
%setup -q -n fruit-%{version} | ||
|
||
%build | ||
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} | ||
|
||
%{__make} %{?jobs:-j%jobs} | ||
|
||
%install | ||
%{__make} DESTDIR=%{buildroot} install | ||
|
||
# TODO: Remove when upgrading to fruit > 0.9.1. | ||
mv %{buildroot}/usr/lib/libfruit* . | ||
mkdir -p %{buildroot}/%{_libdir}/ | ||
mv libfruit* %{buildroot}/%{_libdir}/ | ||
|
||
%files | ||
%defattr(-,root,root) | ||
%{_libdir}/libfruit.* | ||
|
||
%files devel | ||
%defattr(-,root,root) | ||
%{_includedir}/fruit | ||
|
||
%changelog |