From 7661324c01829a795e8c75390257ebefc8a2e517 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 18 Oct 2015 18:05:45 +0200 Subject: updated and integrated OBS build files --- debian/README.source | 7 -- debian/changelog | 5 - debian/compat | 1 - debian/conffiles | 0 debian/control | 15 --- debian/copyright | 24 ----- debian/docs | 9 -- debian/postinst | 40 -------- debian/postrm | 41 --------- debian/prerm | 40 -------- debian/rules | 103 --------------------- debian/shlibs | 0 dist/archlinux/PKGBUILD | 29 ++++++ dist/debian/README.source | 7 ++ dist/debian/changelog | 11 +++ dist/debian/compat | 1 + dist/debian/conffiles | 0 dist/debian/control | 15 +++ dist/debian/copyright | 24 +++++ dist/debian/docs | 9 ++ dist/debian/postinst | 40 ++++++++ dist/debian/postrm | 41 +++++++++ dist/debian/prerm | 40 ++++++++ dist/debian/rules | 103 +++++++++++++++++++++ dist/debian/shlibs | 0 dist/obs/deploy_to_obs.sh | 85 +++++++++++++++++ dist/redhat/pgfuse.spec | 197 ++++++++++++++++++++++++++++++++++++++++ redhat/pgfuse.spec | 227 ---------------------------------------------- 28 files changed, 602 insertions(+), 512 deletions(-) delete mode 100644 debian/README.source delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/conffiles delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/docs delete mode 100644 debian/postinst delete mode 100644 debian/postrm delete mode 100644 debian/prerm delete mode 100755 debian/rules delete mode 100644 debian/shlibs create mode 100644 dist/archlinux/PKGBUILD create mode 100644 dist/debian/README.source create mode 100644 dist/debian/changelog create mode 100644 dist/debian/compat create mode 100644 dist/debian/conffiles create mode 100644 dist/debian/control create mode 100644 dist/debian/copyright create mode 100644 dist/debian/docs create mode 100644 dist/debian/postinst create mode 100644 dist/debian/postrm create mode 100644 dist/debian/prerm create mode 100755 dist/debian/rules create mode 100644 dist/debian/shlibs create mode 100755 dist/obs/deploy_to_obs.sh create mode 100644 dist/redhat/pgfuse.spec delete mode 100644 redhat/pgfuse.spec diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 3a40965..0000000 --- a/debian/README.source +++ /dev/null @@ -1,7 +0,0 @@ -pgfuse for Debian ------------------ - -All debian specific build files are in 'debian/.'. - -Changes should always be done to the main GIT repository at -git://github.com:andreasbaumann/pgfuse diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index ef676da..0000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -pgfuse (0.0.1-1) unstable; urgency=low - - * Initial release - - -- Andreas Baumann Fri, 20 Apr 2012 17:48:00 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/debian/conffiles b/debian/conffiles deleted file mode 100644 index e69de29..0000000 diff --git a/debian/control b/debian/control deleted file mode 100644 index 7e7d999..0000000 --- a/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: pgfuse -Section: unknown -Priority: extra -Maintainer: Andreas Baumann -Build-Depends: debhelper (>= 4.1.16), pkg-config, - libpq-dev, libfuse-dev -Standards-Version: 3.8.3 -Homepage: https://github.com/andreasbaumann/pgfuse - -Package: pgfuse -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: PgFuse - PgFuse is a FUSE filesystem which stores inodes and data into a - PostgreSQL database. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index e5d8eec..0000000 --- a/debian/copyright +++ /dev/null @@ -1,24 +0,0 @@ -This work was packaged for Debian by: - - Andreas Baumann on Fri, 20 Apr 2012 17:48:00 +0200 - -It was downloaded from https://github.com/andreasbaumann/pgfuse - -Upstream Author(s): - - Andreas Baumann - -Copyright: - - - -License: - - GPLv3 - -The Debian packaging is: - - Copyright (C) 2012 Andreas Baumann - - and is licensed under the GPL version 3, - see `/usr/share/common-licenses/GPL-3'. diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 44e876e..0000000 --- a/debian/docs +++ /dev/null @@ -1,9 +0,0 @@ -AUTHORS -COPYING -TODO -FILELIST -BUGS -README -DEVELOPERS -INSTALL -PACKAGERS diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index a88e898..0000000 --- a/debian/postinst +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# Debian postinst script for pgfuse - -# Author: Andreas Baumann - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -# bail out on any error -set -e - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/postrm b/debian/postrm deleted file mode 100644 index ccd81f0..0000000 --- a/debian/postrm +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# Debian postrm script for pgfuse - -# Author: Andreas Baumann - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -# bail out on any error -set -e - -case "$1" in - remove|purge) - ;; - - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/prerm b/debian/prerm deleted file mode 100644 index 7da4645..0000000 --- a/debian/prerm +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# Debian prerm script for pgfuse - -# Author: Andreas Baumann - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -# bail out on any error -set -e - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 6847ed7..0000000 --- a/debian/rules +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. -# -# Modified to make a template file for a multi-binary package with separated -# build-arch and build-indep targets by Bill Allombert 2001 - -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 - -# This is the debhelper compatibility version to use. -export DH_COMPAT=4 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - -export PGFUSE_PARAMS= - -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) - -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - PGFUSE_PARAMS += -j$(NUMJOBS) -endif - -build: build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - $(MAKE) $(PGFUSE_PARAMS) all - - # --- end custom part for compiling - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - $(MAKE) $(PGFUSE_PARAMS) clean || true - # --- end custom part for cleaning up - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package - # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ - - # main package - $(MAKE) install $(PGFUSE_PARAMS) \ - DESTDIR=/usr/src/packages/BUILD/debian/pgfuse - - # --- end custom part for installing - -# 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 diff --git a/debian/shlibs b/debian/shlibs deleted file mode 100644 index e69de29..0000000 diff --git a/dist/archlinux/PKGBUILD b/dist/archlinux/PKGBUILD new file mode 100644 index 0000000..7542bf8 --- /dev/null +++ b/dist/archlinux/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Andreas Baumann +# Maintainer: Andreas Baumann + +pkgname=pgfuse +_mainpkgver=0.0.2 +pkgver=${_mainpkgver} +pkgrel=1 +pkgdesc="FUSE-based file system with a PostgreSQL storage backend" +url="https://github.com/andreasbaumann/pgfuse" +license=('GPL3') +arch=('i686' 'x86_64') +depends=('fuse' 'postgresql-libs') +makedepends=('pkg-config') +source=("${pkgname}-${_mainpkgver}.tar.gz") +md5sums=('ed6fb841d79425806cf059c9561b799e') + +build() { + cd ${srcdir}/${pkgname}-${_mainpkgver} + + msg "Building..." + make +} + +package() { + cd ${srcdir}/${pkgname}-${_mainpkgver} + + msg "Installing.." + make DESTDIR=$pkgdir install +} diff --git a/dist/debian/README.source b/dist/debian/README.source new file mode 100644 index 0000000..3a40965 --- /dev/null +++ b/dist/debian/README.source @@ -0,0 +1,7 @@ +pgfuse for Debian +----------------- + +All debian specific build files are in 'debian/.'. + +Changes should always be done to the main GIT repository at +git://github.com:andreasbaumann/pgfuse diff --git a/dist/debian/changelog b/dist/debian/changelog new file mode 100644 index 0000000..90ee4df --- /dev/null +++ b/dist/debian/changelog @@ -0,0 +1,11 @@ +pgfuse (0.0.2-1) unstable; urgency=low + + * release 0.0.2 + + -- Andreas Baumann Sat, 27 Aug 2015 11:30:40 +0200 + +pgfuse (0.0.1-1) unstable; urgency=low + + * preliminary release + + -- Andreas Baumann Fri, 20 Apr 2012 17:48:00 +0200 diff --git a/dist/debian/compat b/dist/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/dist/debian/compat @@ -0,0 +1 @@ +7 diff --git a/dist/debian/conffiles b/dist/debian/conffiles new file mode 100644 index 0000000..e69de29 diff --git a/dist/debian/control b/dist/debian/control new file mode 100644 index 0000000..7e7d999 --- /dev/null +++ b/dist/debian/control @@ -0,0 +1,15 @@ +Source: pgfuse +Section: unknown +Priority: extra +Maintainer: Andreas Baumann +Build-Depends: debhelper (>= 4.1.16), pkg-config, + libpq-dev, libfuse-dev +Standards-Version: 3.8.3 +Homepage: https://github.com/andreasbaumann/pgfuse + +Package: pgfuse +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: PgFuse + PgFuse is a FUSE filesystem which stores inodes and data into a + PostgreSQL database. diff --git a/dist/debian/copyright b/dist/debian/copyright new file mode 100644 index 0000000..e5d8eec --- /dev/null +++ b/dist/debian/copyright @@ -0,0 +1,24 @@ +This work was packaged for Debian by: + + Andreas Baumann on Fri, 20 Apr 2012 17:48:00 +0200 + +It was downloaded from https://github.com/andreasbaumann/pgfuse + +Upstream Author(s): + + Andreas Baumann + +Copyright: + + + +License: + + GPLv3 + +The Debian packaging is: + + Copyright (C) 2012 Andreas Baumann + + and is licensed under the GPL version 3, + see `/usr/share/common-licenses/GPL-3'. diff --git a/dist/debian/docs b/dist/debian/docs new file mode 100644 index 0000000..44e876e --- /dev/null +++ b/dist/debian/docs @@ -0,0 +1,9 @@ +AUTHORS +COPYING +TODO +FILELIST +BUGS +README +DEVELOPERS +INSTALL +PACKAGERS diff --git a/dist/debian/postinst b/dist/debian/postinst new file mode 100644 index 0000000..a88e898 --- /dev/null +++ b/dist/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh + +# Debian postinst script for pgfuse + +# Author: Andreas Baumann + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# bail out on any error +set -e + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/postrm b/dist/debian/postrm new file mode 100644 index 0000000..ccd81f0 --- /dev/null +++ b/dist/debian/postrm @@ -0,0 +1,41 @@ +#!/bin/sh + +# Debian postrm script for pgfuse + +# Author: Andreas Baumann + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# bail out on any error +set -e + +case "$1" in + remove|purge) + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/prerm b/dist/debian/prerm new file mode 100644 index 0000000..7da4645 --- /dev/null +++ b/dist/debian/prerm @@ -0,0 +1,40 @@ +#!/bin/sh + +# Debian prerm script for pgfuse + +# Author: Andreas Baumann + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +# bail out on any error +set -e + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/rules b/dist/debian/rules new file mode 100755 index 0000000..6847ed7 --- /dev/null +++ b/dist/debian/rules @@ -0,0 +1,103 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=4 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +export PGFUSE_PARAMS= + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + PGFUSE_PARAMS += -j$(NUMJOBS) +endif + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) $(PGFUSE_PARAMS) all + + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + $(MAKE) $(PGFUSE_PARAMS) clean || true + # --- end custom part for cleaning up + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + + # main package + $(MAKE) install $(PGFUSE_PARAMS) \ + DESTDIR=/usr/src/packages/BUILD/debian/pgfuse + + # --- end custom part for installing + +# 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 diff --git a/dist/debian/shlibs b/dist/debian/shlibs new file mode 100644 index 0000000..e69de29 diff --git a/dist/obs/deploy_to_obs.sh b/dist/obs/deploy_to_obs.sh new file mode 100755 index 0000000..c7f9082 --- /dev/null +++ b/dist/obs/deploy_to_obs.sh @@ -0,0 +1,85 @@ +#!/bin/sh + +PACKAGE_NAME=pgfuse +PACKAGE_VERSION=0.0.2 +OSC_HOME=$HOME/home:andreas_baumann/$PACKAGE_NAME + +rm -f ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz +cmake . +make dist-gz + +# git commit count since last tagging is used for a build number of +# the package to make individual builds distinguishable + +GIT_COMMIT_COUNT=`git describe --long --tags | cut -f 2 -d -` + +# Redhat/SuSE + +cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.tar.gz +cp dist/redhat/$PACKAGE_NAME.spec $OSC_HOME/$PACKAGE_NAME.spec +sed -i "s/Version:.*/Version: %{main_version}.${GIT_COMMIT_COUNT}/" $OSC_HOME/$PACKAGE_NAME.spec + +# Debian/Ubuntu + +# generic version for most distros + +cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz + +SIZE=`stat -c '%s' $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz` +CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz | cut -f 1 -d' '` + +cp dist/obs/$PACKAGE_NAME.dsc $OSC_HOME/$PACKAGE_NAME.dsc +echo " $CHKSUM $SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz" >> $OSC_HOME/$PACKAGE_NAME.dsc + +TMPDIR=/tmp +rm -f $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz +rm -rf $TMPDIR/debian +cp -r dist/debian $TMPDIR/. +sed -i "s/${PACKAGE_NAME} (\([0-9.]*\)-\([0-9]*\))/${PACKAGE_NAME} (\1-$GIT_COMMIT_COUNT)/" $TMPDIR/debian/changelog +OLDDIR=$PWD +cd $TMPDIR +tar zcf $TMPDIR/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz debian +cd $OLDDIR +mv -f $TMPDIR/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz $OSC_HOME/. +DEBIAN_SIZE=`stat -c '%s' $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz` +DEBIAN_CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz | cut -f 1 -d' '` +echo " $DEBIAN_CHKSUM $DEBIAN_SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}.debian.tar.gz" >> $OSC_HOME/$PACKAGE_NAME.dsc + +# specific versions (older distros) + +for i in `ls dist/obs/$PACKAGE_NAME-*.dsc`; do + dsc=`basename $i` + cp dist/obs/$dsc $OSC_HOME/$dsc + + echo " $CHKSUM $SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}.orig.tar.gz" >> $OSC_HOME/$dsc + + OS_ORIG=`echo $i | cut -f 2 -d '-' | sed 's/\.dsc$//'` + OS=`echo $i | cut -f 2 -d '-' | sed 's/\.dsc$//' | tr -d '_'` + + rm -rf $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}-$OS.debian.tar.gz + rm -rf $TMPDIR/debian + cp -a dist/debian $TMPDIR/. + test -f dist/obs/control-$OS_ORIG && cp -a dist/obs/control-$OS_ORIG $TMPDIR/debian/control + test -f dist/obs/rules-$OS_ORIG && cp -a dist/obs/rules-$OS_ORIG $TMPDIR/debian/rules + sed -i "s/${PACKAGE_NAME} (\([0-9.]*\)-\([0-9]*\))/${PACKAGE_NAME} (\1-$GIT_COMMIT_COUNT)/" $TMPDIR/debian/changelog + + OLDDIR=$PWD + cd $TMPDIR + tar zcf $TMPDIR/${PACKAGE_NAME}_${PACKAGE_VERSION}-$OS.debian.tar.gz debian + cd $OLDDIR + mv -f $TMPDIR/${PACKAGE_NAME}_${PACKAGE_VERSION}-$OS.debian.tar.gz $OSC_HOME/. + DEBIAN_SIZE=`stat -c '%s' $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}-$OS.debian.tar.gz` + DEBIAN_CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}_${PACKAGE_VERSION}-$OS.debian.tar.gz | cut -f 1 -d' '` + echo " $DEBIAN_CHKSUM $DEBIAN_SIZE ${PACKAGE_NAME}_${PACKAGE_VERSION}-$OS.debian.tar.gz" >> $OSC_HOME/$dsc +done + +# Archlinux + +cp ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz $OSC_HOME/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz + +CHKSUM=`md5sum $OSC_HOME/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz | cut -f 1 -d' '` + +cat dist/archlinux/PKGBUILD > $OSC_HOME/PKGBUILD +echo "md5sums=('$CHKSUM')" >> $OSC_HOME/PKGBUILD + +sed -i "s/^pkgver=.*/pkgver=\${_mainpkgver}.r${GIT_COMMIT_COUNT}/" $OSC_HOME/PKGBUILD diff --git a/dist/redhat/pgfuse.spec b/dist/redhat/pgfuse.spec new file mode 100644 index 0000000..e0f9842 --- /dev/null +++ b/dist/redhat/pgfuse.spec @@ -0,0 +1,197 @@ +# PgFuse RPM spec file +# +# Copyright (C) 2012 + +%define rhel 0 +%define rhel5 0 +%define rhel6 0 +%define rhel7 0 +%if 0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 599 +%define dist rhel5 +%define rhel 1 +%define rhel5 1 +%endif +%if 0%{?rhel_version} >= 600 && 0%{?rhel_version} <= 699 +%define dist rhel6 +%define rhel 1 +%define rhel6 1 +%endif +%if 0%{?rhel_version} >= 700 && 0%{?rhel_version} <= 799 +%define dist rhel7 +%define rhel 1 +%define rhel7 1 +%endif + +%define centos 0 +%define centos5 0 +%define centos6 0 +%define centos7 0 +%if 0%{?centos_version} >= 500 && 0%{?centos_version} <= 599 +%define dist centos5 +%define centos 1 +%define centos5 1 +%endif +%if 0%{?centos_version} >= 600 && 0%{?centos_version} <= 699 +%define dist centos6 +%define centos 1 +%define centos6 1 +%endif +%if 0%{?centos_version} >= 700 && 0%{?centos_version} <= 799 +%define dist centos7 +%define centos 1 +%define centos7 1 +%endif + +%define scilin 0 +%define scilin5 0 +%define scilin6 0 +%define scilin7 0 +%if 0%{?scilin_version} >= 500 && 0%{?scilin_version} <= 599 +%define dist scilin5 +%define scilin 1 +%define scilin5 1 +%endif +%if 0%{?scilin_version} >= 600 && 0%{?scilin_version} <= 699 +%define dist scilin6 +%define scilin 1 +%define scilin6 1 +%endif +%if 0%{?scilin_version} >= 700 && 0%{?scilin_version} <= 799 +%define dist scilin7 +%define scilin 1 +%define scilin7 1 +%endif + +%define fedora 0 +%define fc21 0 +%define fc22 0 +%if 0%{?fedora_version} == 21 +%define dist fc21 +%define fc21 1 +%define fedora 1 +%endif +%if 0%{?fedora_version} == 22 +%define dist fc22 +%define fc22 1 +%define fedora 1 +%endif + +%define suse 0 +%define osu131 0 +%define osu132 0 +%define osufactory 0 +%if 0%{?suse_version} == 1310 +%define dist osu131 +%define osu131 1 +%define suse 1 +%endif +%if 0%{?suse_version} == 1320 +%define dist osu132 +%define osu132 1 +%define suse 1 +%endif +%if 0%{?suse_version} > 1320 +%define dist osufactory +%define osufactory 1 +%define suse 1 +%endif + +%define sles 0 +%define sles11 0 +%define sles12 0 +%if 0%{?suse_version} == 1110 +%define dist sle11 +%define sles11 1 +%define sles 1 +%endif +%if 0%{?suse_version} == 1315 +%define dist sle12 +%define sles12 1 +%define sles 1 +%endif + +Summary: Stores files in a PostgreSQL database using the FUSE API +Name: pgfuse +%define main_version 0.0.2 +Version: %{main_version} +Release: 0.1 +License: GPLv3 +Group: System/Filesystems + +Source: %{name}_%{version}.tar.gz + +URL: https://github.com/andreasbaumann/pgfuse + +BuildRoot: %{_tmppath}/%{name}-root + +# Build dependencies +### + +%if %{rhel} || %{centos} || %{fedora} || %{scilin} +BuildRequires: pkgconfig +%endif +%if %{suse} || %{sles} +BuildRequires: pkg-config +%endif + +BuildRequires: gcc + +%if %{rhel} || %{centos} || %{fedora} || %{scilin} +%if %{rhel5} || %{centos5} || %{scilin5} +BuildRequires: postgresql84-devel +Requires: postgresql84-libs +%else +BuildRequires: postgresql-devel >= 8.4 +Requires: postgresql-libs >= 8.4 +%endif +%endif + +%if %{suse} +BuildRequires: postgresql-devel >= 8.4 +Requires: postgresql-libs >= 8.4 +%endif + +%if %{sles} +BuildRequires: postgresql-devel >= 8.4 +Requires: postgresql-libs >= 8.4 +%endif + +BuildRequires: fuse-devel >= 2.6 +Requires: fuse-libs >= 2.6 +Requires: fuse >= 2.6 + +# Check if 'Distribution' is really set by OBS (as mentioned in bacula) +%if ! 0%{?opensuse_bs} +Distribution: %{dist} +%endif + +%description +PgFuse stores a whole filesystem in a set of database tables in a +PostgreSQL database. This is done using the FUSE API. + +%prep +%setup + +%build + +make %{?_smp_mflags} + +%install +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr( -, root, root ) +%{_bindir}/pgfuse +%{_datadir}/man/man1/pgfuse.1.gz +%dir %{_datadir}/%{name}-%{version} +%{_datadir}/%{name}-%{version}/schema.sql + +%changelog +* Sat Aug 27 2015 Andreas Baumann 0.0.2-0.1 +- release 0.0.2 + +* Fri Apr 20 2012 Andreas Baumann 0.0.1-0.1 +- preliminary release diff --git a/redhat/pgfuse.spec b/redhat/pgfuse.spec deleted file mode 100644 index aa96bd5..0000000 --- a/redhat/pgfuse.spec +++ /dev/null @@ -1,227 +0,0 @@ -# PgFuse RPM spec file -# -# Copyright (C) 2012 - -%define rhel 0 -%define rhel5 0 -%define rhel6 0 -%define rhel7 0 -%if 0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 599 -%define dist rhel5 -%define rhel 1 -%define rhel5 1 -%endif -%if 0%{?rhel_version} >= 600 && 0%{?rhel_version} <= 699 -%define dist rhel6 -%define rhel 1 -%define rhel6 1 -%endif -%if 0%{?rhel_version} >= 700 && 0%{?rhel_version} <= 799 -%define dist rhel7 -%define rhel 1 -%define rhel7 1 -%endif - -%define centos 0 -%define centos5 0 -%define centos6 0 -%define centos7 0 -%if 0%{?centos_version} >= 500 && 0%{?centos_version} <= 599 -%define dist centos5 -%define centos 1 -%define centos5 1 -%endif -%if 0%{?centos_version} >= 600 && 0%{?centos_version} <= 699 -%define dist centos6 -%define centos 1 -%define centos6 1 -%endif -%if 0%{?centos_version} >= 700 && 0%{?centos_version} <= 799 -%define dist centos7 -%define centos 1 -%define centos7 1 -%endif - -%define scilin 0 -%define scilin5 0 -%define scilin6 0 -%define scilin7 0 -%if 0%{?scilin_version} >= 500 && 0%{?scilin_version} <= 599 -%define dist scilin5 -%define scilin 1 -%define scilin5 1 -%endif -%if 0%{?scilin_version} >= 600 && 0%{?scilin_version} <= 699 -%define dist scilin6 -%define scilin 1 -%define scilin6 1 -%endif -%if 0%{?scilin_version} >= 700 && 0%{?scilin_version} <= 799 -%define dist scilin7 -%define scilin 1 -%define scilin7 1 -%endif - -%define fedora 0 -%define fc14 0 -%if 0%{?fedora_version} == 14 -%define dist fc14 -%define fc14 1 -%define fedora 1 -%endif -%define fc15 0 -%if 0%{?fedora_version} == 15 -%define dist fc15 -%define fc15 1 -%define fedora 1 -%endif -%define fc16 0 -%if 0%{?fedora_version} == 16 -%define dist fc16 -%define fc16 1 -%define fedora 1 -%endif -%define fc17 0 -%if 0%{?fedora_version} == 17 -%define dist fc17 -%define fc17 1 -%define fedora 1 -%endif -%define fc18 0 -%if 0%{?fedora_version} == 18 -%define dist fc18 -%define fc18 1 -%define fedora 1 -%endif -%define fc19 0 -%if 0%{?fedora_version} == 19 -%define dist fc19 -%define fc19 1 -%define fedora 1 -%endif -%define fc20 0 -%if 0%{?fedora_version} == 20 -%define dist fc20 -%define fc20 1 -%define fedora 1 -%endif -%define fc21 0 -%if 0%{?fedora_version} == 21 -%define dist fc21 -%define fc21 1 -%define fedora 1 -%endif - -%define suse 0 -%define osu114 0 -%define osu121 0 -%define osu122 0 -%define osu131 0 -%if 0%{?suse_version} == 1140 -%define dist osu114 -%define osu114 1 -%define suse 1 -%endif -%if 0%{?suse_version} == 1210 -%define dist osu121 -%define osu121 1 -%define suse 1 -%endif -%if 0%{?suse_version} >= 1220 -%define dist osu122 -%define osu122 1 -%define suse 1 -%endif -%if 0%{?suse_version} >= 1310 -%define dist osu131 -%define osu131 1 -%define suse 1 -%endif - -%define sles 0 -%if 0%{?sles_version} == 11 -%define dist sle11 -%define sles 1 -%endif - -Summary: Stores files in a PostgreSQL database using the FUSE API -Name: pgfuse -Version: 0.0.1 -Release: 0.1 -License: GPLv3 -Group: System/Filesystems - -Source: %{name}_%{version}.tar.gz - -URL: https://github.com/andreasbaumann/pgfuse - -BuildRoot: %{_tmppath}/%{name}-root - -# Build dependencies -### - -%if %{rhel} || %{centos} || %{fedora} || %{scilin} -BuildRequires: pkgconfig -%endif -%if %{suse} || %{sles} -BuildRequires: pkg-config -%endif - -BuildRequires: gcc - -%if %{rhel} || %{centos} || %{fedora} || %{scilin} -%if %{rhel5} || %{centos5} || %{scilin5} -BuildRequires: postgresql84-devel -Requires: postgresql84-libs -%else -BuildRequires: postgresql-devel >= 8.4 -Requires: postgresql-libs >= 8.4 -%endif -%endif - -%if %{suse} -BuildRequires: postgresql-devel >= 8.4 -Requires: postgresql-libs >= 8.4 -%endif - -%if %{sles} -BuildRequires: postgresql-devel >= 8.4 -Requires: postgresql-libs >= 8.4 -%endif - -BuildRequires: fuse-devel >= 2.6 -Requires: fuse-libs >= 2.6 -Requires: fuse >= 2.6 - -# Check if 'Distribution' is really set by OBS (as mentioned in bacula) -%if ! 0%{?opensuse_bs} -Distribution: %{dist} -%endif - -%description -PgFuse stores a whole filesystem in a set of database tables in a -PostgreSQL database. This is done using the FUSE API. - -%prep -%setup - -%build - -make %{?_smp_mflags} - -%install -make DESTDIR=$RPM_BUILD_ROOT install - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr( -, root, root ) -%{_bindir}/pgfuse -%{_datadir}/man/man1/pgfuse.1.gz -%dir %{_datadir}/%{name}-%{version} -%{_datadir}/%{name}-%{version}/schema.sql - -%changelog -* Fri Apr 20 2012 Andreas Baumann 0.0.1-0.1 -- preliminary release -- cgit v1.2.3-54-g00ecf