initial commit
[PackageFactory.git] / Autotools.rb
blob121ccabc8de314a80a04192856ac7b71c9d96019
1 require 'Package'
3 class Autotools<Package
5         def initalize()
6                 super
7         end
9         def build()
10                 return "export CFLAGS='%s'\n" % @cflags +
11                 "export CXXFLAGS='%s'\n" % @cxxflags +
12                 "export FFLAGS='%s'\n" % @fflags+
13                 "./configure --host=%s --build=%s --target=%s \\\n" % [ @host, @build, @target ] +
14                 "--program-prefix= \\\n" +
15                 "--prefix=%s \\\n" % @prefix +
16                 "--exec-prefix=%s \\\n" % @prefix +
17                 "--bindir=%s \\\n" % @bindir +
18                 "--sbindir=%s \\\n" % @sbindir +
19                 "--sysconfdir=%s \\\n" % @sysconfdir +
20                 "--datadir=%s \ \\\n" % @datadir +
21                 "--includedir=%s \ \\\n" % @includedir +
22                 "--libdir=%s \ \\\n" % @libdir +
23                 "--libexecdir=%s \ \\\n" % @libexecdir+
24                 "--localstatedir=%s \ \\\n" % @localstatedir +
25                 "--mandir=%s \ \\\n" % @mandir +
26                 "--infodir=%s\n" % @infodir +
27                 "make -j %s\n" % @jobs
28         end
30         def install()
31                 return "make DESTDIR=%s install" % buildroot()
32         end
34 end