Navigation Menu

Skip to content

Commit

Permalink
package ubuntu: add a make target to upload to Launchpad
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 28, 2014
1 parent 8176e19 commit a8d5f4a
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -10,6 +10,7 @@ CMakeCache.txt
Makefile
Makefile.in
cmake_install.cmake
/*.tar.gz
/aclocal.m4
/autom4te.cache/
/config.*
Expand All @@ -28,7 +29,10 @@ cmake_install.cmake
/groonga-normalizer-mysql.pc
/test/grntest
/test/groonga-command
/test/tmp
/packages/*.tar.gz
/packages/apt/tmp/*
/packages/ubuntu/tmp/
/packages/yum/tmp/*
/packages/rpm/*/*.spec
/.gdb_history
23 changes: 23 additions & 0 deletions configure.ac
Expand Up @@ -102,6 +102,28 @@ AC_ARG_WITH(rsync-path,
[RSYNC_PATH="packages@packages.groonga.org:public"])
AC_SUBST(RSYNC_PATH)

AC_ARG_WITH(launchpad-uploader-pgp-key,
[AS_HELP_STRING([--with-launchpad-uploader-pgp-key=KEY],
[specify PGP key UID to upload Groonga packages to Launchpad.])],
[LAUNCHPAD_UPLOADER_PGP_KEY="$withval"],
[LAUNCHPAD_UPLOADER_PGP_KEY=""])
AC_SUBST(LAUNCHPAD_UPLOADER_PGP_KEY)

AC_ARG_WITH([groonga-source-path],
AS_HELP_STRING([--with-groonga-source-path=PATH],
[Specify Groonga source path for
groonga-normalizer-mysql's release manager.]),
[GROONGA_SOURCE_PATH="$withval"])
case "$GROONGA_SOURCE_PATH" in
""|/*)
: # do nothing
;;
*)
GROONGA_SOURCE_PATH="\$(top_builddir)/${GROONGA_SOURCE_PATH}"
;;
esac
AC_SUBST(GROONGA_SOURCE_PATH)

AC_ARG_WITH([cutter-source-path],
AS_HELP_STRING([--with-cutter-source-path=PATH],
[Specify Cutter source path for
Expand All @@ -128,6 +150,7 @@ AC_CONFIG_FILES([
normalizers/Makefile
packages/Makefile
packages/apt/Makefile
packages/ubuntu/Makefile
packages/rpm/Makefile
packages/rpm/centos/Makefile
packages/rpm/centos/groonga-normalizer-mysql.spec
Expand Down
1 change: 1 addition & 0 deletions packages/Makefile.am
@@ -1,5 +1,6 @@
SUBDIRS = \
apt \
ubuntu \
rpm \
yum \
source
28 changes: 28 additions & 0 deletions packages/ubuntu/Makefile.am
@@ -0,0 +1,28 @@
CODE_NAMES = precise,saucy,trusty
SOURCE = ../$(PACKAGE)-$(VERSION).tar.gz

all:

ensure-configuration:
@if test -z "$(LAUNCHPAD_UPLOADER_PGP_KEY)"; then \
echo "--with-launchpad-uploader-pgp-key configure option must be specified."; \
false; \
fi
@if test -z "$(GROONGA_SOURCE_PATH)"; then \
echo "--with-groonga-source-path configure option must be specified."; \
false; \
fi

upload: source ensure-configuration
$(GROONGA_SOURCE_PATH)/packages/ubuntu/upload.rb \
--package '$(PACKAGE)' \
--version '$(VERSION)' \
--source-archive '$(SOURCE)' \
--code-names '$(CODE_NAMES)' \
--debian-directory '$(srcdir)/../debian/' \
--pgp-sign-key '$(LAUNCHPAD_UPLOADER_PGP_KEY)'

source: $(SOURCE)

$(SOURCE):
ln -s $(abs_top_builddir)/$(PACKAGE)-$(VERSION).tar.gz $(SOURCE)

0 comments on commit a8d5f4a

Please sign in to comment.