summaryrefslogtreecommitdiff
path: root/net-misc/capi4hylafax
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/capi4hylafax
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/capi4hylafax')
-rw-r--r--net-misc/capi4hylafax/Manifest8
-rw-r--r--net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r2.ebuild156
-rw-r--r--net-misc/capi4hylafax/files/capi4hylafax.confd19
-rw-r--r--net-misc/capi4hylafax/files/capi4hylafax.initd63
-rw-r--r--net-misc/capi4hylafax/metadata.xml17
5 files changed, 263 insertions, 0 deletions
diff --git a/net-misc/capi4hylafax/Manifest b/net-misc/capi4hylafax/Manifest
new file mode 100644
index 000000000000..92fbc1a2b874
--- /dev/null
+++ b/net-misc/capi4hylafax/Manifest
@@ -0,0 +1,8 @@
+AUX capi4hylafax.confd 555 SHA256 f61418080f0c7fa5cca6197fa00b007224124e9aa78b4efdb2c9e0e7005fbea3 SHA512 357504c887bb12a3b93e0ab8a4e7a7789e2848b831f27fba653e3fd9bf62b694edfb758d82693b61b992de834e9d5a0d1e4a8aa1e50dbd6e2d0649c9581e9821 WHIRLPOOL 0b119c2aa37973a16d72eabefbc6bae49425f1274e1a5d82866deb91e87644f352b39cb289595d79d94fc392d6b56b2f3b624334226979eb0c864fc5d1ac5359
+AUX capi4hylafax.initd 1821 SHA256 4139d1d3bbcafb32eaf1e7729601b69a97eec116d2538c3b489df663157de31a SHA512 bd5d427631b825b886f1e56ff118c795bd04868df459cc8dc0a66d87004a36748eb8f55978bda64af19db3706f7be96b55739da43f28c762a6cd69ed91fd70c5 WHIRLPOOL 049b8b0ea081b39301aaf4c3df6e682245c31c9223edf202796d4e7e2d02b6cddc48dec09f21b6e08911f6bff5f53b6acdb822aa196a59cdec9dab768287a9f4
+DIST capi4hylafax_01.03.00.99.svn.300-20.debian.tar.gz 546271 SHA256 783d31e3ae73df91607e86856ff93338eaf2c84f9b31ad21106005e479232f4c SHA512 a0c1e64d783150abf80feecca07a3eebead95a982133ac9601b204b73933468c61fa39863be8c93ea2bf52c5262b9944b4d5c4a8795475d3a5ca17e481401b8e WHIRLPOOL 25e9d37697fdf0bbde5bb84bfeea37ac749bdfca5da8b75b5474e39c3684efdd9ff517773bc0d77641331a5bdb9c500dc0caf7dfec84733fb200e1a5c7e1bf92
+DIST capi4hylafax_01.03.00.99.svn.300.orig.tar.gz 533410 SHA256 8c5433fda85d5f178382c0a4fbc07cf22fc22c448146a4b7a090bc6a0b1789c2 SHA512 c01063bcdf7d5dfbeef0eadd94a0714b5f34f442c19e5287a0fa40ce3ecbbad53afaddeb093435952367fb7b503dd9c637002d954a58175df3920d9d2966c468 WHIRLPOOL 1fafcf1f88fe02f7b4b0bca0b4c40d1917d5fb1f02a11bd67aeebe46e049fcadecde78f8c6b7626c4bb4f23a3bdbec86a3e013e383ccf202cae407842ec0ae29
+EBUILD capi4hylafax-01.03.00.99.300.20-r2.ebuild 4258 SHA256 66353bb81b7833c72c0cad8cc3dba613b30d6349f3353abdf6a04fe3843e5134 SHA512 0dfb6723616096ba308d410c7294931fc9c56b09a908138288c9edf6b1db0887880dfbdec37eae1e3a198c413dd2b1a70f2429c2398c38248cf73fb56e8afa8d WHIRLPOOL 9f2b254894e33ce91ce10ed13d2c6ebb603fc10ce535e7a98d7174e89940b9a5eafb2f1b09fefe2e2aaf42da816d2dc26ba31e2adb21a569c05b29890ff34c20
+MISC ChangeLog 4390 SHA256 300f50b3190ae017156c2e4647f632873a7016ef8ffb12c9261604905dbd20f3 SHA512 11ede10ff2560113fb7b3c64a9f944747661cbe00799ba1b860cc110f42c7c1272ee2ff9bc40aaabf054f5686fd0907339ccec7fc38129d0b11839502ea9c959 WHIRLPOOL d518a150cfa919767cbca49e871a6e43fe6c2fecb82ac2b09a51f74308bf3b561b7111b1090023b1fdd7b9ab40b1936e99ae1aa58f7f222281672145b42c69b4
+MISC ChangeLog-2015 5587 SHA256 62808c51e91a8a7697e263de3da0baa68f7945517fdd881ed88b36a9d5e31083 SHA512 7d2d06ab7a40ab0f1720fbaecc9b21015cf159cf74dc92646ee6dfcf593519c2d9d22ad4c5b067bf3ea311f667a035bc31a60ad310731abde682b1cc710d9f9f WHIRLPOOL 6fdd846b00883dd473a6137299c4ac893a74e82b305df82902abc6adb944bc1a7fb80a15af2dd9a7b5ec62cff4e2db8699c2e2f747b2f22b69e54242621171c5
+MISC metadata.xml 680 SHA256 29622e82f3965fd229659f38ed3002fe71282a27a5d95a840d55ef15f633bcfb SHA512 c27851901f9af6dc6d30cf3fe0c9133b9a2f9fa97b488a763d7eb2208a1829bd4bd16c7c8581257b9367142ca458d330b0ec8507b0e0160760506e3a180e31aa WHIRLPOOL 8266f3daf958cbd364cfb4e40322dcbaa26d6ffc1bd9ea7b380945b4c394a0e093f54c5af9f93451d3a77a7602957f19c35edb8ff0b263f582eda8eef8b3a6fa
diff --git a/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r2.ebuild b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r2.ebuild
new file mode 100644
index 000000000000..bcdf51d45f78
--- /dev/null
+++ b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.20-r2.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils versionator
+
+FAX_SPOOL_DIR="${ROOT}/var/spool/fax"
+
+MY_PV1="$(get_version_component_range 1-4)"
+MY_PV2="$(get_version_component_range 5)"
+MY_PV3="$(get_version_component_range 6)"
+MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
+
+DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
+HOMEPAGE="https://packages.qa.debian.org/c/capi4hylafax.html"
+SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.debian.tar.gz"
+
+S="${WORKDIR}/${PN}-svn"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="
+ app-shells/bash:0
+ media-libs/tiff:0
+ net-libs/libcapi
+ sys-libs/zlib
+ virtual/jpeg:0
+"
+RDEPEND="
+ ${DEPEND}
+ dev-util/dialog
+"
+
+DOCS=( AUTHORS ChangeLog Readme_src )
+HTML_DOCS=( README.html LIESMICH.html )
+
+src_prepare() {
+ EPATCH_SOURCE="${WORKDIR}/debian/patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ eapply_user
+
+ eautoreconf
+
+ mv ../debian . || die
+
+ # fix location of fax spool
+ sed -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" \
+ -i config.faxCAPI \
+ -i Readme_src \
+ -i src/defaults.h.in \
+ -i debian/*.1 || die
+
+ # fix location of fax config
+ sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile || die
+
+ # fix name and location of logfile
+ sed -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" \
+ -i config.faxCAPI || die
+
+ sed -e "s:/tmp/capifax.log:/var/log/${PN}.log:" \
+ -i src/defaults.h.in config.faxCAPI || die
+
+ # patch man pages
+ sed -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
+ -e "s:c2send:c2faxsend:g" \
+ -e "s:c2recv:c2faxrecv:g" \
+ -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
+ -e "s:capi4hylafaxconfig:c2faxaddmodem:g" \
+ -i debian/*.1 || die
+
+ cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8 || die
+}
+
+src_configure() {
+ econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}"
+}
+
+src_install() {
+ keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
+ fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
+ fperms 0700 "${FAX_SPOOL_DIR}"
+
+ default
+
+ # install setup script
+ newsbin setupconffile c2faxaddmodem
+
+ # install sample config
+ insinto "${FAX_SPOOL_DIR}/etc"
+ newins config.faxCAPI config.faxCAPI.default
+
+ # install docs
+ newdoc debian/changelog ChangeLog.debian
+
+ # install man pages
+ doman debian/c2fax*.[18]
+
+ # install examples
+ insinto /usr/share/doc/${PF}/examples
+ doins sample_faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
+ newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
+ newins debian/faxsend sample_faxsend
+
+ # finally install init-script + config
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
+
+pkg_postinst() {
+ einfo
+ elog "To use capi4hylafax:"
+ elog "Make sure that your isdn/capi devices are owned by"
+ elog "the \"uucp\" user (see udev or devfsd config)."
+ elog "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
+ elog "to suit your system."
+
+ if [ -n "${REPLACING_VERSIONS}" ]; then
+ elog
+ elog "If you're upgrading from a previous version"
+ elog "please check for new or changed options."
+ elog "A sample default config is installed as:"
+ elog "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
+ else
+ elog
+ elog "Please run package config to install a default configuration."
+ fi
+
+ elog
+ elog "You should also check special options in:"
+ elog "/etc/conf.d/${PN}"
+ elog
+ elog "The following optional dependency is also available:"
+ optfeature "hylafax integration" net-misc/hylafax
+ elog
+ elog "Then append the following line to your hylafax"
+ elog "config file (${FAX_SPOOL_DIR}/etc/config):"
+ elog "SendFaxCmd: /usr/bin/c2faxsend"
+ einfo
+}
+
+pkg_config() {
+ local config_file="${FAX_SPOOL_DIR}/etc/config.faxCAPI"
+ if [ -e "${config_file}" ]; then
+ eerror "The configuration file already exists. Please either update"
+ eerror "or remove this file and re-run package configuration."
+ eerror "Configuration file location: ${config_file}"
+ else
+ elog "Installing template configuration file to ${config_file}"
+ cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
+ "${config_file}" || die
+ fi
+}
diff --git a/net-misc/capi4hylafax/files/capi4hylafax.confd b/net-misc/capi4hylafax/files/capi4hylafax.confd
new file mode 100644
index 000000000000..40aa8cfe603d
--- /dev/null
+++ b/net-misc/capi4hylafax/files/capi4hylafax.confd
@@ -0,0 +1,19 @@
+# configuraton file for /etc/init.d/capi4hylafax
+
+# Activate Logging (Filename have to be specified in the config file).
+#ACTIVATE_LOGGING="yes"
+
+# Specify the output format. Allowed types are:
+# HYLAFAX (default), TIFF, SFF, G3
+#OUTPUT_FORMAT="HYLAFAX"
+
+# Virtual device name only needed for Hylafax.
+#VIRTUAL_DEVICE="faxCAPI"
+
+# Name and path of the config file
+#CONFIG_FILE="/var/spool/fax/etc/config.faxCAPI"
+
+# Directory where received faxes are to be stored.
+# Do not set it in Hylafax mode (see OUTPUT_FORMAT)!
+#RECEIVE_DIR="/var/spool/fax/recvq"
+
diff --git a/net-misc/capi4hylafax/files/capi4hylafax.initd b/net-misc/capi4hylafax/files/capi4hylafax.initd
new file mode 100644
index 000000000000..08c3917f6f8f
--- /dev/null
+++ b/net-misc/capi4hylafax/files/capi4hylafax.initd
@@ -0,0 +1,63 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need capi
+}
+
+checkconfig() {
+ local DEFAULT_OUTPUT_FORMAT="HYLAFAX"
+ local DEFAULT_VIRTUAL_DEVICE="faxCAPI"
+ local DEFAULT_RECEIVE_DIR="/var/spool/fax"
+ local DEFAULT_CONFIG_FILE="/var/spool/fax/etc/config.faxCAPI"
+
+ [ -n "${CONFIG_FILE}" ] || CONFIG_FILE="${DEFAULT_CONFIG_FILE}"
+ [ -n "${OUTPUT_FORMAT}" ] || OUTPUT_FORMAT="${DEFAULT_OUTPUT_FORMAT}"
+ [ -n "${VIRTUAL_DEVICE}" ] || VIRTUAL_DEVICE="${DEFAULT_VIRTUAL_DEVICE}"
+ [ "${OUTPUT_FORMAT}" = "HYLAFAX" ] || DEFAULT_RECEIVE_DIR="/var/spool/fax/recvq"
+ [ -n "${RECEIVE_DIR}" ] || RECEIVE_DIR="${DEFAULT_RECEIVE_DIR}"
+
+ if [ ! -f "${CONFIG_FILE}" ]; then
+ eerror "You're missing ${CONFIG_FILE}"
+ return 1
+ fi
+
+ OPTIONS=""
+ PIDFILE="/var/run/c2faxrecv.pid"
+
+ [ "${ACTIVATE_LOGGING}" = "yes" ] && OPTIONS="${OPTIONS} -L"
+
+ [ "${OUTPUT_FORMAT}" = "${DEFAULT_OUTPUT_FORMAT}" ] || \
+ OPTIONS="${OPTIONS} -f ${OUTPUT_FORMAT}"
+
+ [ "${CONFIG_FILE}" = "${DEFAULT_CONFIG_FILE}" ] || \
+ OPTIONS="${OPTIONS} -C ${CONFIG_FILE}"
+
+ [ "${OUTPUT_FORMAT}" = "HYLAFAX" -a "${RECEIVE_DIR}" = "${DEFAULT_RECEIVE_DIR}" ] || \
+ OPTIONS="${OPTIONS} -q ${RECEIVE_DIR}"
+
+ if [ "${VIRTUAL_DEVICE}" != "${DEFAULT_VIRTUAL_DEVICE}" ]; then
+ PIDFILE="/var/run/c2faxrecv.${VIRTUAL_DEVICE}.pid"
+ OPTIONS="${OPTIONS} ${VIRTUAL_DEVICE}"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting CAPI4HylaFAX for ${VIRTUAL_DEVICE}"
+ start-stop-daemon -b -m --quiet --start --pidfile ${PIDFILE} \
+ --exec /usr/bin/c2faxrecv -- ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ ebegin "Stopping CAPI4HylaFAX for ${VIRTUAL_DEVICE}"
+ start-stop-daemon >/dev/null --quiet --stop --pidfile ${PIDFILE} --retry 10 && \
+ /bin/rm -f ${PIDFILE}
+ eend $?
+}
+
diff --git a/net-misc/capi4hylafax/metadata.xml b/net-misc/capi4hylafax/metadata.xml
new file mode 100644
index 000000000000..b5d05033d344
--- /dev/null
+++ b/net-misc/capi4hylafax/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ capi4hylafax adds a faxcapi modem to the hylafax enviroment. So you can
+ send and receive FAX documents with CAPI 2.0 fax controllers via a
+ hylafax server.
+ </longdescription>
+ <longdescription lang="ja">
+ capi4hylafax は hylafax 環境に faxcopi
+ モデムを加えます。つまり hylafax
+ サーバに対して CAPI 2.0 fax コントローラ経由で FAX
+ ドキュメントを送信したり
+ 受信したりできるようになります。
+ </longdescription>
+</pkgmetadata>