On Thu, Aug 24, 2017 at 12:39:05AM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber <r.hie...@pengutronix.de>
> ---
>  rules/libpaper.in   | 32 ++++++++++++++++++++++
>  rules/libpaper.make | 77 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 109 insertions(+)
>  create mode 100644 rules/libpaper.in
>  create mode 100644 rules/libpaper.make
> 
> diff --git a/rules/libpaper.in b/rules/libpaper.in
> new file mode 100644
> index 000000000..6052d2c14
> --- /dev/null
> +++ b/rules/libpaper.in
> @@ -0,0 +1,32 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig LIBPAPER
> +     tristate
> +     prompt "libpaper                      "
> +     select HOST_AUTOTOOLS_AUTOCONF
> +     select HOST_AUTOTOOLS_LIBTOOL
> +     help
> +       System-wide paper size configuration
> +
> +if LIBPAPER
> +
> +config LIBPAPER_SIZE
> +     string "default fallback paper size"
> +     default "letter"
> +     help
> +       Paper size that is used if nothing else is specified in /etc/papersize
> +
> +config LIBPAPER_PAPERCONFIG
> +     bool "install paperconfig"
> +     help
> +       Install the paperconfig tool which sets the default paper size of the
> +       system
> +
> +config LIBPAPER_PAPERCONF
> +     bool "install paperconf"
> +     help
> +       Install the paperconf tool which prints information about a specific
> +       paper size
> +
> +endif
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/libpaper.make b/rules/libpaper.make
> new file mode 100644
> index 000000000..3e94ed2f2
> --- /dev/null
> +++ b/rules/libpaper.make
> @@ -0,0 +1,77 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber <r.hie...@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBPAPER) += libpaper
> +
> +#
> +# Paths and names
> +#
> +# libpaper seems to be maintained only as a Debian package, therefore the
> +# unusual versioning.
> +#
> +LIBPAPER_VERSION     := 1.1.24+nmu5
> +LIBPAPER_MD5         := 38bc55688c0fc5544edaa5a951a45fbd
> +LIBPAPER             := libpaper-$(LIBPAPER_VERSION)
> +LIBPAPER_SUFFIX              := tar.gz
> +LIBPAPER_URL         := 
> http://http.debian.net/debian/pool/main/libp/libpaper/libpaper_$(LIBPAPER_VERSION).$(LIBPAPER_SUFFIX)

This URL will break once a new version hits debian testing. Please use a
http://snapshot.debian.org/ URL.

> +LIBPAPER_SOURCE              := $(SRCDIR)/$(LIBPAPER).$(LIBPAPER_SUFFIX)
> +LIBPAPER_DIR         := $(BUILDDIR)/$(LIBPAPER)
> +LIBPAPER_LICENSE     := GPL-2.0
> +
> +# 
> ----------------------------------------------------------------------------
> +# Prepare
> +# 
> ----------------------------------------------------------------------------
> +
> +LIBPAPER_CONF_ENV    := \
> +     $(CROSS_ENV) \
> +     PAPERSIZE=$(PTXCONF_LIBPAPER_SIZE)
> +
> +#
> +# autoconf, but upstream does not provide a ./configure
> +#
> +$(STATEDIR)/libpaper.prepare:
> +     @$(call targetinfo)
> +     @$(call clean, $(LIBPAPER_DIR)/config.cache)
> +     @cd $(LIBPAPER_DIR) && \
> +             autoreconf --install && \
> +             $(LIBPAPER_PATH) $(LIBPAPER_CONF_ENV) \
> +             ./configure $(CROSS_AUTOCONF_USR)
> +     @$(call touch)

No, create a 'patches/libpaper-.../autogen.sh' and use the default prepare
stage.

> +
> +# 
> ----------------------------------------------------------------------------
> +# Target-Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libpaper.targetinstall:
> +     @$(call targetinfo)
> +
> +     @$(call install_init, libpaper)
> +     @$(call install_fixup, libpaper,PRIORITY,optional)
> +     @$(call install_fixup, libpaper,SECTION,base)
> +     @$(call install_fixup, libpaper,AUTHOR,"Roland Hieber 
> <r.hie...@pengutronix.de>")
> +     @$(call install_fixup, libpaper,DESCRIPTION,missing)
> +
> +     @$(call install_lib, libpaper, 0, 0, 0755, libpaper)
> +
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONFIG),y)
> +     @$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
> +endif
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONF),y)
> +     @$(call install_copy, libpaper, 0, 0, 755, -, /usr/bin/paperconf)
> +endif
> +
> +     @$(call install_finish, libpaper)
> +
> +     @$(call touch)
> +
> +# vim: ft=make ts=8 noet tw=80
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to