1 ################################################################################
3 # ggz.cygclass - functions for building GGZ packages
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****ih* Cygclasses/ggz.cygclass
26 # The GGZ Gaming Zone is a framework for hosting and playing multi-player
27 # games over the Internet. The project provides a server for self-hosting,
28 # client libraries, and client games.
30 # This cygclass is used for building GGZ upstream components and provides
31 # functions for installing third-party clients.
33 # Upstream development seems to have ceased, and projects which previously
34 # provided GGZ functionality have removed those dependencies. Therefore, this
35 # cygclass is deprecated and may be removed in the future.
38 #****io* ggz.cygclass/CATEGORY (ggz)
42 #****io* ggz.cygclass/SUMMARY (ggz)
44 SUMMARY="GGZ Gaming Zone ${PN#ggz-} component"
46 #****io* ggz.cygclass/HOMEPAGE (ggz)
48 HOMEPAGE="http://dev.ggzgamingzone.org/"
50 #****io* ggz.cygclass/SRC_URI (ggz)
52 SRC_URI="http://ftp.ggzgamingzone.org/pub/ggz/${PV}/${P}.tar.gz "
55 #****id* ggz.cygclass/GGZ_MODULES_DIR
57 # The directory where GGZ ModuleInfo description files are installed.
59 GGZ_MODULES_DIR=/etc/ggz/modules
61 export ac_cv_header_winsock_h=no
62 export ac_cv_header_winsock2_h=no
64 #****iI* ggz.cygclass/ggz_postinst
66 # Creates postinstall and preremove scripts which de/register GGZ ModuleInfo
67 # description files with ggz-config.
72 rm -f ${D}/etc/ggz.modules
79 for g in $(ls ${D}${GGZ_MODULES_DIR}/* 2> /dev/null)
81 dodir /etc/postinstall /etc/preremove
83 cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
84 /usr/bin/ggz-config --force --install --modfile=${GGZ_MODULES_DIR}/${g##*/}
87 cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF
88 /usr/bin/ggz-config --remove --modfile=${GGZ_MODULES_DIR}/${g##*/}
93 #****iI* ggz.cygclass/doggzmod
95 # doggzmod DESCRIPTION_FILE [DESCRIPTION_FILE] ...
97 # Installs the given GGZ ModuleInfo description file(s) into GGZ_MODULES_DIR.
98 # As such files are often generically named (e.g. "module.dsc"), files are
99 # automatically renamed to reflect the name of the program specified in their
100 # CommandLine attribute.
110 error "doggzmod: ${m}: file not found"
113 cl=$(sed -n -e 's|^CommandLine *= *\([^ ]*\).*|\1|gp' ${m})
115 insinto ${GGZ_MODULES_DIR}
116 newins ${m} ${cl##*/}.dsc
120 #****io* ggz.cygclass/src_install (ggz)
129 readonly -f ggz_postinst doggzmod