diff options
author | taca <taca> | 2012-10-01 15:38:32 +0000 |
---|---|---|
committer | taca <taca> | 2012-10-01 15:38:32 +0000 |
commit | 6c511fa22021e3e570f2af7665dbd36be23b99b5 (patch) | |
tree | 1067722427548139e938c1262fb49ab39f4a85c2 /www/contao211-translations | |
parent | d577ec2653dc9aa39f32e352148ed276ede06fd4 (diff) | |
download | pkgsrc-6c511fa22021e3e570f2af7665dbd36be23b99b5.tar.gz |
Move some code fragment from contao to contao211-translations since
translation files will be included in Contao core from next major release
(Contao 3.0).
Diffstat (limited to 'www/contao211-translations')
-rw-r--r-- | www/contao211-translations/INSTALL | 15 | ||||
-rw-r--r-- | www/contao211-translations/Makefile | 34 | ||||
-rw-r--r-- | www/contao211-translations/options.mk | 21 |
3 files changed, 65 insertions, 5 deletions
diff --git a/www/contao211-translations/INSTALL b/www/contao211-translations/INSTALL new file mode 100644 index 00000000000..254675963e6 --- /dev/null +++ b/www/contao211-translations/INSTALL @@ -0,0 +1,15 @@ +# $NetBSD: INSTALL,v 1.1 2012/10/01 15:38:32 taca Exp $ + +CT_WEBDIR="@PREFIX@/@CT_WEBDIR@" +CT_OWN="@WWWOWN@" +CT_GRP="@WWWGRP@" + +case ${STAGE} in +POST-INSTALL) + cd ${CT_WEBDIR}/system/modules && \ + for i in */languages; do + ${CHGRP} -R ${CT_GRP} $i + ${CHOWN} -R ${CT_OWN} $i + done + ;; +esac diff --git a/www/contao211-translations/Makefile b/www/contao211-translations/Makefile index c149d585e91..82a0b89cadb 100644 --- a/www/contao211-translations/Makefile +++ b/www/contao211-translations/Makefile @@ -1,15 +1,43 @@ -# $NetBSD: Makefile,v 1.20 2012/09/27 13:47:14 taca Exp $ +# $NetBSD: Makefile,v 1.21 2012/10/01 15:38:32 taca Exp $ # +DISTNAME= contao${CT_VER}-translations-${VERS} +CATEGORIES= www +MASTER_SITES= # defined for each distfiles +DISTFILES= ${CT_DISTFILES} +EXTRACT_DIR= ${WRKSRC} + +MAINTAINER= taca@NetBSD.org +HOMEPAGE= http://www.contao.org/download.html +COMMENT= Language files for Contao CMS +LICENSE= gnu-lgpl-v3 + +DEPENDS+= contao${CT_VER}>=${CT_PKGVER}:../../www/contao${CT_VER} + # Use time stamp of latest translation. VERS= 201209250 CT_VERS= 211 -PKG_DESTDIR_SUPPORT= user-destdir +USE_TOOLS= pax +NO_BUILD= yes +NO_CONFIGURE= yes +PLIST_SRC= ${WRKDIR}/PLIST .include "options.mk" -.include "../../www/contao/Makefile.translations" +pre-install: + ${RM} -f ${WRKSRC}/system/modules/backend/languages/*/tl_task.php + ${FIND} ${WRKSRC}/system/modules \ + \( -name "*.orig*" -o -name tl_flash.php \) -exec ${RM} -f {} \; + ${FIND} ${WRKSRC} -type f -exec ${CHMOD} -x {} \; + +do-install: + cd ${WRKSRC}; pax -rw . ${DESTDIR}${PREFIX}/${CT_WEBDIR} + ${SED} -e 1q PLIST.master > ${PLIST_SRC} + for lang in ${CT_LANGUAGES}; do \ + ${SED} -e 1d -e "s|@lang@|$${lang}|" PLIST.master; \ + done | ${SORT} >> ${PLIST_SRC} + .include "../../www/contao/Makefile.common" .include "../../lang/php/phpversion.mk" .include "../../mk/bsd.pkg.mk" diff --git a/www/contao211-translations/options.mk b/www/contao211-translations/options.mk index 3099baf2db9..f0f40dd981c 100644 --- a/www/contao211-translations/options.mk +++ b/www/contao211-translations/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.20 2012/09/27 13:47:14 taca Exp $ +# $NetBSD: options.mk,v 1.21 2012/10/01 15:38:32 taca Exp $ # Not yet ready for Contao 2.11: # af ar bs ca da gl gn hr id is ku @@ -47,4 +47,21 @@ CT_TRANSLATIONS.tr= Contao-Turkish-v14.zip # 2011/03/24 CT_TRANSLATIONS.uk= Contao-Ukrainian-v17.zip # 2011/07/25 CT_TRANSLATIONS.zh= Contao-Chinese-v21.zip # 2012/09/25 -.include "../../www/contao/options.translations.mk" +PKG_OPTIONS_VAR= PKG_OPTIONS.contao${CT_VERS}-translations + +.for l in ${CT_SUPPORTED_LANGUAGES} +PKG_SUPPORTED_OPTIONS+= lang-${l} +PKG_SUGGESTED_OPTIONS+= lang-${l} +.endfor + +.include "../../mk/bsd.options.mk" + +.for l in ${PKG_OPTIONS:Mlang-*} +CT_LANGUAGES+= ${l:S/^lang-//1} +.endfor + +.for l in ${CT_LANGUAGES} +CT_DISTFILES+= ${CT_TRANSLATIONS.${l}} +SITES.${CT_TRANSLATIONS.${l}}= \ + http://www.contao.org/en/download.html?iso=${l}&file=files/languages/${l}/ +.endfor |