1/* 2 * This file is part of the LibreOffice project. 3 * 4 * This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 * 8 * This file incorporates work covered by the following license notice: 9 * 10 * Licensed to the Apache Software Foundation (ASF) under one or more 11 * contributor license agreements. See the NOTICE file distributed 12 * with this work for additional information regarding copyright 13 * ownership. The ASF licenses this file to you under the Apache 14 * License, Version 2.0 (the "License"); you may not use this file 15 * except in compliance with the License. You may obtain a copy of 16 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 17 */ 18 19#include <types.h> 20 21namespace gb 22{ 23 using namespace types; 24 class PackagePart 25 { 26 private: 27 /// PackagePart s do not need to be explicitly constructed. 28 /// They are named after the path of their source file (without 29 /// file extension) from the root of their source repository. 30 PackagePart(String name, Path Source); 31 friend Package; 32 /// Returns a list of absolute paths where files are copied to with the PackagePart class. 33 34 /// This function needs to be defined in solenv/gbuild/target_names.mk so that it is available to everywhere. 35 static const List<Path> get_destinations(); 36 }; 37 38 class Package : public Target, public IsCleanable 39 { 40 public: 41 /// Creates a new package that copies files from source_dir to the \$(INSTDIR). 42 Package(String name, Path source_dir); 43 /// Adds a file to the package. destination is the relative path in 44 /// the \$(INSTROOT) and source is the relative path in the source_dir. 45 add_file(Path destination, Path source); 46 } 47} 48/* vim: set filetype=cpp : */ 49