data.parts 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ############################################################################
  2. # Copyright 2016 Intel Corporation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################
  16. Import('*')
  17. # Normal stuff that all Parts should have
  18. env.PartName("sample_data")
  19. #files
  20. data_files = Pattern(src_dir='../data',
  21. includes=[
  22. 'cacert.bin',
  23. 'grprl.bin',
  24. 'grprl_empty.bin',
  25. 'README.md',
  26. 'groupa/privrl.bin',
  27. 'groupa/pubkey.bin',
  28. 'groupa/sigrl.bin',
  29. 'groupa/member0/mprivkey.dat',
  30. 'groupa/member1/mprivkey.dat',
  31. 'groupa/privrevokedmember0/mprivkey.dat',
  32. 'groupa/privrevokedmember1/mprivkey.dat',
  33. 'groupa/privrevokedmember2/mprivkey.dat',
  34. 'groupa/sigrevokedmember0/mprivkey.dat',
  35. 'groupa/sigrevokedmember1/mprivkey.dat',
  36. 'groupa/sigrevokedmember2/mprivkey.dat',
  37. 'groupb/privrl.bin',
  38. 'groupb/pubkey.bin',
  39. 'groupb/sigrl.bin',
  40. 'groupb/member0/mprivkey.dat',
  41. 'groupb/privrevokedmember0/mprivkey.dat',
  42. 'groupb/sigrevokedmember0/mprivkey.dat',
  43. ],
  44. recursive=True)
  45. sample_default_files = Pattern(src_dir='../data',
  46. includes=[
  47. 'cacert.bin',
  48. 'grprl.bin',
  49. 'mprivkey.dat',
  50. 'pubkey.bin',
  51. ],
  52. recursive=True)
  53. if 'install_package' in env['MODE']:
  54. env.InstallTopLevel(data_files, sub_dir='example/data')
  55. env.InstallTopLevel(sample_default_files, sub_dir='example/data')
  56. part_file = ['data.parts']
  57. env.InstallTopLevel(part_file, sub_dir='example/data')
  58. else:
  59. env.InstallData(data_files,
  60. sub_dir='data',
  61. no_pkg=False)
  62. env.InstallData(sample_default_files,
  63. sub_dir='',
  64. no_pkg=False)