1 #ifndef INSTALLEDFILE_H_
2 #define INSTALLEDFILE_H_
4 #include "filetarget.h"
5 #include "libbuilder_api.h"
6 #include "sourcepackage.h"
9 Represents the installation of a file.
11 class LIBBUILDER_API InstalledFile: public FileTarget
18 InstalledFile(Builder &, const SourcePackage &, FileTarget &, const std::string & =std::string());
20 static Msp::FS::Path generate_target_path(const Msp::FS::Path &, const FileTarget &i, const std::string &);
23 const char *get_type() const override { return "InstalledFile"; }
24 FileTarget &get_source() const { return source; }
26 /** Sets a symlink for the file. A relative path will be rooted at the
27 directory the file resides in. */
28 void set_symlink(const Msp::FS::Path &);
30 const Msp::FS::Path &get_symlink() const { return link; }
32 FileTarget *get_real_target() override;
34 void check_rebuild() override;
37 void clean() override;