overdue-scratch

Author Topic: Revisit Chameleon's package builder  (Read 54108 times)

0 Members and 1 Guest are viewing this topic.

Blackosx

  • Forum Moderator
  • Posts: 1117
Re: Revisit Chameleon's package builder
« Reply #270 on: February 29, 2012, 03:01:53 PM »
Thanks for the continued investigation JrCs.

I've had a quick test using prop2po and it works as you've said, and running Poedit here shows it's a useful app and will help to populate the other languages. :)

This is great for plain text files, but what shall we do for the RTF files? as prop2po doesn't like those:

Code: [Select]
prop2po --encoding=UTF-16LE -P License.rtf l_en.pot
prop2po: warning: Couldn't handle input file License.rtf: don't know what to do with input format .rtf, no template file

I'll do some reading later as maybe there's more to it...

Thx JrCs!

follow your steps...
This is looking a better approach Fabio :)
« Last Edit: February 29, 2012, 03:04:09 PM by Blackosx »
10.9.4 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #271 on: March 01, 2012, 10:06:56 AM »
Hi all,

what i'm thinking is put all the xxx.lproj in a template directory. For each rtf files replace the strings with an id like: @@WELCOME_MESSAGE@@. After that put the english string in en.pot file:

Code: [Select]
#. // ============================================================================
#. // Strings for RTF Files
#. // ----------------------------------------------------------------------------
#: @@WELCOME_MESSAGE@@
msgid "Hello user of Chameleon."
msgstr ""

Open poedit, load the already translated file ie: fr.po. Use the option in the menu Catalog->Update from POT file and load the en.pot file. Poedit will add the strings that is in en.pot file and not in fr.po (so it will add the @@WELCOME_MESSAGE@@ string). Now translate the string and save the file.
Now you will have a fr.po containing something like:
Code: [Select]
#. // ============================================================================
#. // Strings for RTF Files
#. // ----------------------------------------------------------------------------
#: @@WELCOME_MESSAGE@@
msgid "Hello user of Chameleon."
msgstr "Bonjour utilisateur de Chameleon."

So it's the solution to translate all the strings (in RTF or in strings files).

We now have to write a little script that replace all the @@xxxxxxx@@ strings in the RTF templates files to the right translation and put the file in the package. If you want i can try to write this script.

What do you think about this ?

JrCs

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #272 on: March 01, 2012, 12:04:17 PM »
Re all,

perhaps i found the ultimate solution  ;D

With this solution we don't have to create id and write directly the master template in english.
First the problem with the solution i send just before is that we need to work with RTF which is in a binary format.
With this solution we can have only ONE master text file in english and convert it to localized RTF files.

Here the solution:
Convert the english RTF file to a markdown text file (http://en.wikipedia.org/wiki/Markdown)

So a Welcome.rtf file will be convert to Welcome.mmd:
Quote
#->Chameleon<-#
->v%CHAMELEONVERSION% r%CHAMELEONREVISION%<-

->Do not install to an Apple Macintosh computer<-


->**Developpers :**<-
->%DEVELOP%<-

->**Thanks to :**<-
->%CREDITS%<-

->**Package :**<-
->%PKGDEV%<-

->Package built by: %WHOBUILD%, language translated by: blackosx<-
Copyright © %CPRYEA%

After that we can extract all strings to an en.pot file with po4a (http://po4a.alioth.debian.org/man/man7/po4a.7.php.en)
Code: [Select]
po4a-gettextize -f text -m Welcome.mmd -M UTF-8 -p en.potwhich create a pot file like this:
Quote
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2012-03-01 11:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Plain text
#: Welcome.mmd:3
msgid "#->Chameleon<-# ->v%CHAMELEONVERSION% r%CHAMELEONREVISION%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:5
msgid "->Do not install to an Apple Macintosh computer<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:9
msgid "->**Developpers :**<- ->%DEVELOP%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:12
msgid "->**Thanks to :**<- ->%CREDITS%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:15
msgid "->**Package :**<- ->%PKGDEV%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:17
msgid ""
"->Package built by: %WHOBUILD%, language translated by: blackosx<- Copyright "
"© %CPRYEA%"
msgstr ""

Now copy en.pot to fr.po for the traduction and open the fr.po in poedit. Translate the file and we have now a fr.po file:
Quote
# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: TEST 1.0\n"
"POT-Creation-Date: 2012-03-01 11:23+0100\n"
"PO-Revision-Date: 2012-03-01 11:28+0100\n"
"Last-Translator: Yves Blusseau <xxxxx@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Plain text
#: Welcome.mmd:3
msgid "#->Chameleon<-# ->v%CHAMELEONVERSION% r%CHAMELEONREVISION%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:5
msgid "->Do not install to an Apple Macintosh computer<-"
msgstr "->Ne pas installer sur un ordinateur Apple Macintosh<-"

#. type: Plain text
#: Welcome.mmd:9
msgid "->**Developpers :**<- ->%DEVELOP%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:12
msgid "->**Thanks to :**<- ->%CREDITS%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:15
msgid "->**Package :**<- ->%PKGDEV%<-"
msgstr ""

#. type: Plain text
#: Welcome.mmd:17
msgid "->Package built by: %WHOBUILD%, language translated by: blackosx<- Copyright © %CPRYEA%"
msgstr ""

Now translate the original document (Welcome.mmd) to a localized one (Welcome.fr.mmd):

Code: [Select]
po4a-translate -f text -m Welcome.mmd -M utf-8 -p fr.po -k 10 -l Welcome.fr.mmd
The new generated file (Welcome.fr.mmd):
Quote
#->Chameleon<-#
->v%CHAMELEONVERSION% r%CHAMELEONREVISION%<-

->Ne pas installer sur un ordinateur Apple Macintosh<-


->**Developpers :**<-
->%DEVELOP%<-

->**Thanks to :**<-
->%CREDITS%<-

->**Package :**<-
->%PKGDEV%<-

->Package built by: %WHOBUILD%, language translated by: blackosx<-
Copyright © %CPRYEA%

The last phase is to convert all the localized markdown file (.mmd) to RTF file.
For that we can use MultiMarkdown which is avaible for OSX.

If we change the master file Welcome.mmd we only have to update the xx.po file with:
Code: [Select]
po4a-updatepo -f text -m Welcome.mmd -M utf-8 -p fr.pothen fix translation with poedit

What is really good with this solution:
* Work only with standardize text files
* Replacing our own strings (like %CREDITS%) is easy with text files.
* We can merge all the translation to one file for one language.

If the markdown language is not enough for us we can use other format because po4a knows a lot of other format:
Quote
  - dia: uncompressed Dia diagrams.
  - docbook: DocBook XML.
  - guide: Gentoo Linux's XML documentation format.
  - ini: INI format.
  - kernelhelp: Help messages of each kernel compilation option.
  - latex: LaTeX format.
  - man: Good old manual page format.
  - pod: Perl Online Documentation format.
  - sgml: either DebianDoc or DocBook DTD.
  - texinfo: The info page format.
  - tex: generic TeX documents (see also latex).
  - text: simple text document.
  - wml: WML documents.
  - xhtml: XHTML documents.
  - xml: generic XML documents (see also docbook).

Tell me what do you think about that.

JrCs

Blackosx

  • Forum Moderator
  • Posts: 1117
Re: Revisit Chameleon's package builder
« Reply #273 on: March 01, 2012, 12:11:24 PM »
Hi JrCs

I've just followed your steps above for adding extra strings to the en.pot file, then using Catalog->Update for the fr.po file. This works as you've described.

So is the plan to still use a template for each: Conclusion.rtfd, Description.html, Localizable.strings, Welcome.rtfd.
Then to have a .po file for each language: ar.po, bg.po, bs.po, de.po, el.po, en.po  etc.

We now have to write a little script that replace all the @@xxxxxxx@@ strings in the RTF templates files to the right translation and put the file in the package. If you want i can try to write this script.

What do you think about this ?
Great. And yes please, if you have the time of course.

EDIT:.. Okay, this was a reply to your previous post..
Let me look at this markdown discovery you've made... :)

Wow.. At first glance this looks fantastic  ;D
I would like to recreate the steps here to understand it better but from what you have posted - it looks the ideal solution.
I'll try to find some time soon, but in the mean time feel free to continue this development :)

Good research JrCs.
« Last Edit: March 01, 2012, 12:18:58 PM by Blackosx »
10.9.4 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #274 on: March 01, 2012, 04:07:13 PM »
Re,

i've made some tests, and i think markdown is not our best solution for the master template. The best is to use an HTML file and use po4a to extract/reinsert strings to po files.

Use a command like this to convert english html master file to localized french html:
Code: [Select]
po4a-translate -f xml -m Welcome.html -M utf-8 -p fr.po -k 0 -l Welcome.fr.html
After that convert the localized file to an rtfd bundle:
Code: [Select]
textutil -convert rtfd Welcome.fr.html
I will try to made a skeleton for chameleon.
 
JrCs
« Last Edit: March 01, 2012, 04:21:49 PM by JrCs »

Blackosx

  • Forum Moderator
  • Posts: 1117
Re: Revisit Chameleon's package builder
« Reply #275 on: March 01, 2012, 05:10:24 PM »
i've made some tests, and i think markdown is not our best solution for the master template. The best is to use an HTML file and use po4a to extract/reinsert strings to po files.
....with so many tools to choose from it's hard to decide which best suits the task in hand. Lol  :P
But it looks like you've identified a good procedure to follow now.

Code: [Select]
po4a-translate -f xml -m Welcome.html -M utf-8 -p fr.po -k 0 -l Welcome.fr.html
So where did po4a-translate come from? I don't see that tool in /usr/local/bin after installing the translate toolkit the other day.

Code: [Select]
textutil -convert rtfd Welcome.fr.html
I had a read about textutil the other week and found it amazing at what it could do.

I will try to made a skeleton for chameleon.
Brilliant. If you need any help (or testing etc.) from me then just ask.
10.9.4 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #276 on: March 01, 2012, 06:54:01 PM »

Code: [Select]
po4a-translate -f xml -m Welcome.html -M utf-8 -p fr.po -k 0 -l Welcome.fr.html
So where did po4a-translate come from? I don't see that tool in /usr/local/bin after installing the translate toolkit the other day.

You need to install it manually as it is not packaged. It's very easy (it's only perl packages):
Code: [Select]
cd /tmp
svn checkout svn://anonscm.debian.org/po4a/trunk po4a
cd po4a
perl ./Build.PL --prefix=/opt/local
sudo ./Build install

I use --prefix=/opt/local because i have macports installed

JrCs

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #277 on: March 02, 2012, 02:02:35 AM »
Just one info.
The license.rtf file (the content into it) is exactly the same present in the root of chameleon project APPLE_LICENSE

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #278 on: March 02, 2012, 08:29:30 AM »
Thanks Fabio for the info.

I have try yesterday to translate HTML file with po4a: it's so easy. Just one command and it will translate one master file to as many language you want.

Do you know if OSX package can use HTML file (like Description.html) instead of RTF files (like Welcome.rtfd and Conclusion.rtfd) ? If yes it will be too easy to translate chameleon package.

JrCs

ErmaC

  • Resident
  • Posts: 134
Re: Revisit Chameleon's package builder
« Reply #279 on: March 02, 2012, 12:41:06 PM »
Do you know if OSX package can use HTML file (like Description.html) instead of RTF files (like Welcome.rtfd and Conclusion.rtfd) ? If yes it will be too easy to translate chameleon package.

Yep
.html, .rtf, .txt
for welcone.xx , description.xx , license.xx , conclusion.xx
edit ino the description file (about the extension used) are needed.

localizable.strings ... no idea... tecnically is a txt file with different extensions?

Fabio
P6T Deluxe v1 i7 940 Quadro Fx 5600
P6T SE i7 920 GeForce GT 240

Blackosx

  • Forum Moderator
  • Posts: 1117
Re: Revisit Chameleon's package builder
« Reply #280 on: March 04, 2012, 09:43:00 AM »
JrCs, I see you've already got some way in to building a working model in your branch using pot/po files. Well done :)

However, would it be too late to clean the original English source .pot file? It was something I had done when I was working on the translations previously as the english localizable.string file contained some references to items that were either no longer in use or not supported by the current package installer. The items I would remove are:

Code: [Select]
#. type: "InstallType_title"
#. type: "InstallType_description"
#. type: "New_title"
#. type: "New_description"
#. type: "Upgrade_title"
#. type: "Upgrade_description"
#. type: "EFI_title"
#. type: "EFI_description"
#. type: "Keylayout_title"
#. type: "Keylayout_description"
#. type: "Utility_title"
#. type: "Utility_description"
#. type: "PrefPanel_title"
#. type: "PrefPanel_description"
#. type: "SMBIOS_title"
#. type: "SMBIOS_description"
#. type: "Documentation_title"
#. type: "Documentation_description"
#. type: "mac-pt_title"
#. type: "mac-pt_description"
#. type: "pc-de_title"
#. type: "pc-de_description"
#. type: "pc-es_title"
#. type: "pc-es_description"
#. type: "pc-it_title"
#. type: "pc-it_description"
#. type: "pc-se_title"
#. type: "pc-se_description"
#. type: "pc-pt_title"
#. type: "pc-pt_description"

Hope it's not too much of an issue?

Regards
blackosx
10.9.4 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #281 on: March 04, 2012, 11:00:54 AM »
Hi BlackOSX.

All done. It's so easy with po files. Strings removed but keep in case we need it later (managed automaticaly by po4a).

About what have done: I have wrote a perl plugin for po4a to handle Localized.strings files. So now we can translate any html or strings files. Also i update a lot the process to made the transalations. We don't need any external program like translate-toolkit or other things. Just do a
Code: [Select]
make pkg  ;D

We can change the resources template files (in package/Resources/templates) and po4a will add/remove the strings automaticaly in the po files. All the translations are in po directory (package/po) and can be edit with poedit for example. Update resources template or po files and po4a will do the job to translate all the resources files (Welcome.html, Description.html, Conclusion.html, Localized.strings) in all languages that are defined in the po directory.

We can checkout my branch (JrCs) if you want to test. I will commit to trunk very soon.

JrCs

Blackosx

  • Forum Moderator
  • Posts: 1117
Re: Revisit Chameleon's package builder
« Reply #282 on: March 04, 2012, 01:28:39 PM »
Fantastic..
Okay testing...

Just checked out your branch and make pkg.
One issue:
Code: [Select]
========= Translating Resources ========
Error: failed to execute 'msgmerge -U po/ar.po po/chameleon.pot --lang=ar --previous --backup=none': No such file or directory.
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/all-wcprops: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/entries: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/text-base/background.tiff.svn-base: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/all-wcprops: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/entries: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/text-base/License.rtf.svn-base: Permission denied
Leaves me with only /sym/package/Chameleon/Resources/en.lproj/License.rtf

I'm looking forward to seeing it all working :)

-----------------
...I will commit to trunk very soon.
On another note, when you update the trunk can you also have a look at the cpio issue when building under Snow Leopard?
buildpkg, line 865 - Change 0:0 to root:wheel
buildpkg, line 873 - Change 0:0 to root:wheel

and finally, this line in function make distribution() in buildpkg ?
Code: [Select]
find "${PKG_BUILD_DIR}/${packagename}" \( -type d -name '.svn' \) -o -name '.DS_Store' -exec rm -rf {} \;We've discussed this previously and it should work but it doesn't here and spits errors.
I'd changed it to the following code in my branch , which we know does exactly the same thing as the above code but just doesn't spit errors:
Code: [Select]
find "${PKG_BUILD_DIR}/${packagename}/Resources" -name ".svn" -type d -o -name ".DS_Store" -type f | while read component
    do
rm -rf "${component}"
    done

Thanks
blackosx
10.9.4 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

JrCs

  • VoodooLabs
  • Posts: 49
Re: Revisit Chameleon's package builder
« Reply #283 on: March 04, 2012, 02:08:09 PM »
cked out your branch and make pkg.
One issue:
Code: [Select]
========= Translating Resources ========
Error: failed to execute 'msgmerge -U po/ar.po po/chameleon.pot --lang=ar --previous --backup=none': No such file or directory.
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/all-wcprops: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/entries: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/text-base/background.tiff.svn-base: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/all-wcprops: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/entries: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/text-base/License.rtf.svn-base: Permission denied
Leaves me with only /sym/package/Chameleon/Resources/en.lproj/License.rtf

I'm looking forward to seeing it all working :)

You need the gettext utilities. If you have MacPorts you can installed it with
Code: [Select]
sudo port -cu install gettextIf you don't want to install MacPorts the utilities can be found in Poedit.app in /Applications/Poedit.app/Contents/MacOS/ directory.

...I will commit to trunk very soon.
On another note, when you update the trunk can you also have a look at the cpio issue when building under Snow Leopard?
buildpkg, line 865 - Change 0:0 to root:wheel
buildpkg, line 873 - Change 0:0 to root:wheel

Done in trunk :)

and finally, this line in function make distribution() in buildpkg ?
Code: [Select]
find "${PKG_BUILD_DIR}/${packagename}" \( -type d -name '.svn' \) -o -name '.DS_Store' -exec rm -rf {} \;We've discussed this previously and it should work but it doesn't here and spits errors.
I'd changed it to the following code in my branch , which we know does exactly the same thing as the above code but just doesn't spit errors:
Code: [Select]
find "${PKG_BUILD_DIR}/${packagename}/Resources" -name ".svn" -type d -o -name ".DS_Store" -type f | while read component
    do
rm -rf "${component}"
    done

Thanks
blackosx

Done in trunk :)

Blackosx

  • Forum Moderator
  • Posts: 1117
Re: Revisit Chameleon's package builder
« Reply #284 on: March 04, 2012, 04:08:09 PM »
You need the gettext utilities. If you have MacPorts you can installed it with
Code: [Select]
sudo port -cu install gettextIf you don't want to install MacPorts the utilities can be found in Poedit.app in /Applications/Poedit.app/Contents/MacOS/ directory.
Thanks for the tip but I'm going to need your help as this is new to me  :-[
I've tried this....
Code: [Select]
sudo cp /Applications/Poedit.app/Contents/MacOS/msgmerge /usr/local/bin
export PATH="/Volumes/MainSystem/usr/local/bin/: $PATH"

and this is what I see....

Code: [Select]
========= Translating Resources ========
Error: 'msgmerge -U po/ar.po po/chameleon.pot --lang=ar --previous --backup=none' died with signal 5, without coredump.
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/all-wcprops: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/entries: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/prop-base/background.tiff.svn-base: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/.svn/text-base/background.tiff.svn-base: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/all-wcprops: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/entries: Permission denied
/Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/package/buildpkg.sh: line 164: /Volumes/Store/Computing/Hackintosh/SOURCE_GIT_SVN/Chameleon/Chameleon_Branch_JrCs/JrCs/sym/package/Chameleon/Resources/en.lproj/.svn/text-base/License.rtf.svn-base: Permission denied
Can you please help me?

Done in trunk :)
Thanks for both.
10.9.4 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB