-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathproject.rb
68 lines (62 loc) · 2.72 KB
/
project.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
project "my-app" do |proj|
# Project level settings our components will care about
proj.setting(:prefix, "/opt/my-app")
proj.setting(:sysconfdir, "/etc/my-app")
proj.setting(:logdir, "/var/log/my-app")
proj.setting(:bindir, File.join(proj.prefix, "bin"))
proj.setting(:libdir, File.join(proj.prefix, "lib"))
proj.setting(:includedir, File.join(proj.prefix, "include"))
proj.setting(:datadir, File.join(proj.prefix, "share"))
proj.setting(:mandir, File.join(proj.datadir, "man"))
proj.setting(:artifactory_url, "https://artifactory.delivery.puppetlabs.net/artifactory")
proj.setting(:buildsources_url, "#{proj.artifactory_url}/generic/buildsources")
if platform.is_windows?
proj.setting(:company_name, "BananaLand Inc.")
proj.setting(:company_id, "BananaLand")
proj.setting(:common_product_id, "MyAppInstaller")
proj.setting(:service_name, "my-app-service")
proj.setting(:product_id, "my-app")
proj.setting(:upgrade_code, "SOME_GUID")
if platform.architecture == "x64"
proj.setting(:win64, "yes")
else
proj.setting(:win64, "no")
end
end
proj.description "This app does some things."
proj.version "1.2.3"
proj.license "ASL 2.0"
proj.vendor "Me <[email protected]>"
proj.homepage "https://www.my-app.com"
proj.requires "glibc"
proj.component "component1"
proj.component "component2"
# Here we rewrite public http urls to use our internal source host instead.
# Something like https://www.openssl.org/source/openssl-1.0.0r.tar.gz gets
# rewritten as
# https://artifactory.delivery.puppetlabs.net/artifactory/generic/buildsources/openssl-1.0.0r.tar.gz
#
# @deprecated 2017-04-07 - Ryan McKern
# This functionality has been replaced with Component Mirrors. This feature
# will be removed before Vanagon 1.0.0, but for now it will add all rewritten
# URLs/URIs to the list of mirrors
#
# proj.register_rewrite_rule 'http', proj.buildsources_url
# Here we rewrite public git urls to use our internal git mirror It turns
# urls that look like git://github.com/puppetlabs/puppet.git into
# git://github.delivery.puppetlabs.net/puppetlabs-puppet.git
#
# @deprecated 2017-04-07 - Ryan McKern
# This functionality has been replaced with Component Mirrors. This feature
# will be removed before Vanagon 1.0.0, but for now it will add all rewritten
# URLs/URIs to the list of mirrors
#
# proj.register_rewrite_rule 'git', Proc.new { |url|
# match = url.match(/github.com\/(.*)$/)
# "git://github.delivery.puppetlabs.net/#{match[1].gsub('/', '-')}" if match
# }
# directory adds a directory (and its contents) to the package that is created
proj.directory proj.prefix
proj.directory proj.sysconfdir
proj.directory proj.logdir
end