]> git.tdb.fi Git - builder.git/blob - source/tarball.cpp
Add a tarball component type
[builder.git] / source / tarball.cpp
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #include "sourcepackage.h"
9 #include "tar.h"
10 #include "tarball.h"
11
12 using namespace std;
13
14 TarBall::TarBall(Builder &b, const SourcePackage &p, const string &n):
15         FileTarget(b, &p, p.get_source()/(n+".tar"))
16 {
17         buildable=true;
18 }
19
20 const SourcePackage *TarBall::get_package() const
21 {
22         return static_cast<const SourcePackage *>(package);
23 }
24
25 Action *TarBall::create_action()
26 {
27         return new Tar(builder, *this);
28 }