Advertisement
Guest User

Untitled

a guest
Feb 4th, 2012
1,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.84 KB | None | 0 0
  1. # Maintainer: Martin Schmölzer <mschmoelzer@gmail.com>
  2.  
  3. # BUILD INSTRUCTIONS:
  4. # ----------------------
  5. # This package is intended as a more up-to-date replacement for the AUR
  6. # 'ttf-ms-fonts' and 'ttf-vista-fonts' packages. It provides newer versions of
  7. # the fonts in these packages, but due to license issues cannot automatically
  8. # download the fonts.
  9. #
  10. # Instead, you must acquire them from a Windows 7 system or install media:
  11. #  - Running Windows 7 system: fonts are located in C:\Windows\Fonts
  12. #  - Windows 7 install media: fonts are located in sources/install.wim, which
  13. #    is a "Windows Imaging Format" archive. This archive can be extracted with
  14. #    7-zip (p7zip package): "7z x install.wim 1/Windows/Fonts"
  15. #    Alternatively, you can use GNOME's File Roller (and maybe other archive
  16. #    managers) to extract the files if the p7zip package is installed.
  17. #
  18. # You need the files listed in the source=() array. Place them in the same
  19. # directory as this PKGBUILD file, then run makepkg.
  20. #
  21. # It is possible that the checksums don't match. This is due to the fact that
  22. # different Windows releases may have older or newer fonts than the ones I used
  23. # to create the package. In this case, makepkg will refuse to build the package.
  24. # To fix this, you have to replace the sha256sums=(...) entry in this PKGBUILD:
  25. #  - Run "makepkg -g". It will generate the correct checksums for your files
  26. #    and print them to the console
  27. #  - Copy and paste them into this file, replacing the existing sha256sums=(...)
  28. #    entry.
  29. #
  30. # Windows 7 SP1 has newer versions of the following fonts:
  31. #  - Arial
  32. #  - Cambria
  33. #  - Gabriola
  34. #  - Mangal
  35. #  - Times New Roman
  36. #  - Verdana
  37. #
  38. # These fonts can be extracted from the Windows 7 SP1 updater with the following
  39. # commands:
  40. #  $ cd ~/Downloads  # (or any other working directory)
  41. #  $ wget http://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe
  42. #  $ cabextract -F *.tt[fc] -d win7_sp1 windows6.1-KB976932-X64.exe
  43. #  $ mkdir sp1-fonts
  44. #  $ find win7_sp1 -name *.tt[fc] -exec cp '{}' ./sp1-fonts/ \;
  45. #
  46. # This will copy the fonts to the "sp1-fonts" directory.
  47.  
  48. pkgname=ttf-win7-fonts
  49. pkgver=7.1
  50. pkgrel=3
  51. pkgdesc="Microsoft Windows 7 TrueType Fonts"
  52. arch=('any')
  53. url="http://www.microsoft.com"
  54. license=('custom')
  55. depends=('fontconfig')
  56. makedepends=('fontforge')
  57. provides=('ttf-vista-fonts' 'ttf-ms-fonts')
  58. conflicts=('ttf-vista-fonts' 'ttf-ms-fonts')
  59. install=$pkgname.install
  60.  
  61. ###################################################################
  62. #        Normal        Bold           Italic         Bold+Italic  #
  63. ###################################################################
  64. source=('ariblk.ttf'
  65.         'arial.ttf'   'arialbd.ttf'  'ariali.ttf'   'arialbi.ttf'
  66.         'comic.ttf'   'comicbd.ttf'
  67.         'cour.ttf'    'courbd.ttf'   'couri.ttf'    'courbi.ttf'
  68.         'gabriola.ttf'
  69.         'georgia.ttf' 'georgiab.ttf' 'georgiai.ttf' 'georgiaz.ttf'
  70.         'impact.ttf'
  71.         'mangal.ttf'  'mangalb.ttf'
  72.         'times.ttf'   'timesbd.ttf'  'timesi.ttf'   'timesbi.ttf'
  73.         'trebuc.ttf'  'trebucbd.ttf' 'trebucit.ttf' 'trebucbi.ttf'
  74.         'verdana.ttf' 'verdanab.ttf' 'verdanai.ttf' 'verdanaz.ttf'
  75.         'webdings.ttf'
  76.         'wingding.ttf'
  77.         'calibri.ttf' 'calibrib.ttf' 'calibrii.ttf' 'calibriz.ttf'
  78.         'cambria.ttc' 'cambriab.ttf' 'cambriai.ttf' 'cambriaz.ttf'
  79.         'Candara.ttf' 'Candarab.ttf' 'Candarai.ttf' 'Candaraz.ttf'
  80.         'consola.ttf' 'consolab.ttf' 'consolai.ttf' 'consolaz.ttf'
  81.         'constan.ttf' 'constanb.ttf' 'constani.ttf' 'constanz.ttf'
  82.         'corbel.ttf'  'corbelb.ttf'  'corbeli.ttf'  'corbelz.ttf'
  83.         'license.rtf')
  84. sha256sums=('6dab274b36928bc76b5002eac90a52f2450d07b9327be95acf2bea1e56e4e1da'
  85.             'ca8c3f3b7608a6e8712b027ccbf584818f78e750da1240fcb5d8fa89a0b92747'
  86.             '4033d5cfc2e1acb737c95b1a1bbada6ab7ea98933d67b254cb898fde433fa81d'
  87.             'dee6a6959f9178752c56c3090a947c2fc3621dc265e4bf9e1a009ef56c44cf59'
  88.             '29ce82c87cc7988ca642e01093c4606b2c5bdd6c860daf414b4ee7b17b5e002a'
  89.             'da6bd53ea1f8259e41b198d75e187676c6355086ea8cb3cb0e1690d5237f82a4'
  90.             '8f5d4ac83aeee7dc1361585883ef59304edcfc57f4996be51e74aa3a07c5aa30'
  91.             'c5e7cee4b77caf5ed5f1ffd7510fdb66d32109c6861b4a481b93b9166df03534'
  92.             '89cff1ff9e59a661ba947500e9c242506e2dbf36c0417783dea8b762e13da704'
  93.             'd9c60f6e55128b775b25f8e26b20b486c1a4de56f1d55348d5ab6200d9471b06'
  94.             '5d51cebc9151f377f52b39cd34da80f9179236b1ba4f261ae4023c077114e27b'
  95.             '29eaa6d65d0f1508d2d550d5ddf4e7e3a4e23cf13b376ff93140a8a6115b2f82'
  96.             '46a57e3971f92d2359759f1cf0cc6706def7010a145786cf15c199e44ef9b061'
  97.             '0537ac91f425795dda88d1a8ea66ae59f7357e5eb0c37309621003770c6ae160'
  98.             'd691381f2476ed5ee1e80475a430b4864bf31fd46132b270eec1ce2672b4f8a2'
  99.             '15f287c3345c2e64c2a2da053789dc0eef09ae0fc82a193ca64164b41d3565fe'
  100.             'd9d7f0b973c131b0b7923a726f6f1de964b1073ec982106a027c3db53cf02633'
  101.             '98f6cbbf8c0fb839c0ca08338bc8d2dcc3b4a7d79f3921c71cfd28edb40f3e47'
  102.             '7f74007d58af4db8d77c9c1023f53d03dd87fb68bbd3c4e9d2fb080fabd092b9'
  103.             'd9fb32eb1646d6fc977c63fd780a46c60b6d1f607bf55eb7baa185aa2637711d'
  104.             '268218b3a0009bb3c3e3677c4d107de38a21f2a86cda6b4f6f3ec8e00171f43f'
  105.             'd1baa654326673a6e49c22f3dc2638253a30565a2ae78a1f2c60a1e482230fc8'
  106.             '21732df1135f9ccfbcac6818723f94c5ac3baced44b532a483e889906c4ad419'
  107.             'b69a5b33e997c3bc55f35dde8267cb93fe5fbdc3ecbc23b1d987602a9fd2b1f2'
  108.             '7fea7f91f1140721bd7837a36ed2b1c856215f3ac08e6d2eb29c1afe235d0900'
  109.             '3f1d76cbf72de8cf7afbb6c4f3fcce5e5e89b92c8647310908aa42c44bd29b5c'
  110.             'd374f4cc7819ad7a57204543b5ab01aa1580725bf2571eb66a25155216d90f3b'
  111.             '7568b5a1a38aa5c2e5c486c3ac2e9a7ecd229e81dda726a2266bc935fb5af2fa'
  112.             'd96a5071ed19b6bb2d467ccc9e3645ec10d4a2c14123dd64852719a0f39a8a2f'
  113.             'a3c30d4f91e11d61aef3bd07e58eb50f1a8db2c37c257984794eead020747595'
  114.             'bf2eb7af0acdedaf1984fe2e68c1eb5dcf69798c4161100272d086701e6b10cf'
  115.             '1161ce511c44eb5464a4f8144aaf3eb965a50ed66957ad7d38e497ab9d958e5a'
  116.             'd7c38355bd52f52e043ed904f3463d476925300d1bdca9e842b28077ca3549b8'
  117.             '436cb479a8f9eff517016868323bdfbca1a053bba4cc55c8753859b64d041c5c'
  118.             'ce7dd6ba37e7b8dff865b6ce334ef773b9ad86d8a9d495c309ced108856bed54'
  119.             'd9f13268dca6e828cb9ed5827dc99d188cf0d7c55349f92802fd6532926bdfbf'
  120.             'b5e3f6b9fcdf4b3a89ed182d4ade810d45cfef17f57b4bbc5cd6be1e83de40ab'
  121.             'd675f6efa6f39c92585a0499901593c2df7a1b61cdb6bf4185e3833f83b0106e'
  122.             '2613006fb72ac39d2629cc10dc4046191981bf3c0796addd4a728003271e018f'
  123.             '71e671f7048248bba725729cd5e5f3b1378950bbfc9e592ad15af71df0780607'
  124.             '2582aed03c3370a8fad2e9f93b4b4d30a0b1bafa61c51bf23b8d5f65a1ad53de'
  125.             'f4cc0c11780a2d94cd6b74ed54fa657f26677013028c956ecb40da81c6b59b9e'
  126.             'f959e0709a770094814199e49b0441b13e2bb075475b7ed2125ead7841ff2215'
  127.             'da786a0df49cd2f45a9a8dc67120ec534e4624bf168829947bb08c4f937c21ad'
  128.             'c2017a26bbd51775376baa93ba63095ba90a955c0eb93bbe44b9e73e0958fd73'
  129.             '45c14a49e0ba2edc00b72afad9a930cad5c1b9a93323b239a8c308efc5a65e8e'
  130.             '5c27a540c51a0e60b2caa4e9f6c9164fde89a9fdc560747bfa1658f6e556cf61'
  131.             '18db132c539323badaf0e1c9ceffa497e1996946a8faac26cc5fbe6fc8233314'
  132.             'fc9e9f0b6ae6d068b01e1511e475b508e15799529f53679f1e927f5418040c3f'
  133.             '28401ef53647e4e68f2c2bda54856fe90d9afb1cf4072bf4ea9cf6b380c09d4c'
  134.             '11a7a1c6b1b4028cd7e55f60a9773ecc7d39b66b8f82f5b7c6fbf8a4fdfcf94e'
  135.             'be0306e2040aeeed8bf228524071f4b941d28cbdd3ff413a9db07d1da9213ec9'
  136.             '6bf361ae27d2f67e05d9ad0fa6e0bc4e16c2ada6926d6c24b557e2547f4f242e'
  137.             '83f5b36107f7ea50fd5c52b1c3e8d64de3edc5d0f2c2e2e9f634fbbcfd7abd74'
  138.             '2d3fb4d471e9669a5ab2bc8aa9b359639e17af321510f3b878bae03bc259b056'
  139.             '7e9cd651666dce6dd3ad37b8199c7798b226b8995d35e6b672b53ce0bbec59cb'
  140.             '9c68522951940ad49354f4fce56b528414a7e83c44474ceea0582a5434693066'
  141.             '096cdd18e26b2b3d8cf0b3ec6a1ffb5b0eaae0fcc2105e3c145f19037a42d467')
  142.  
  143. build() {
  144.   cd ${srcdir}
  145.  
  146.   # cambria.ttc is a TrueType Collection (TTC) which causes problems with
  147.   # LibreOffice (Cambria Reguar cannot be selected) so we need to convert
  148.   # the TTC into a TrueType Font (TTF).
  149.   FONTFORGE_LANGUAGE=ff fontforge -c 'Open("cambria.ttc(Cambria)"); Generate("cambria.ttf")'
  150. }
  151.  
  152. package() {
  153.   cd ${srcdir}
  154.  
  155.   # Prepare destination directory
  156.   install -d -m 755 "${pkgdir}/usr/share/fonts/TTF"
  157.  
  158.   # Install fonts and license
  159.   install -m 644 *.ttf "${pkgdir}/usr/share/fonts/TTF"
  160.   install -D -m 644 "license.rtf" "${pkgdir}/usr/share/licenses/${pkgname}/license.rtf"
  161. }
  162.  
  163. # vim: set ts=2 sw=2 ft=sh noet:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement