Display packages installed from a repository
This commit is contained in:
@ -1,6 +1,12 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace katja
|
||||
{
|
||||
@ -21,8 +27,11 @@ namespace katja
|
||||
|
||||
database_package(const std::string& fullname);
|
||||
|
||||
bool operator<(const database_package& that) const;
|
||||
bool operator>(const database_package& that) const;
|
||||
|
||||
std::string to_string() const;
|
||||
};
|
||||
|
||||
|
||||
std::multimap<std::string, database_package> read_installed_database();
|
||||
}
|
||||
|
10
include/katja/repository.hpp
Normal file
10
include/katja/repository.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace katja
|
||||
{
|
||||
}
|
29
include/katja/sbo.hpp
Normal file
29
include/katja/sbo.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
|
||||
namespace katja
|
||||
{
|
||||
struct info_file
|
||||
{
|
||||
const std::string program_name;
|
||||
const std::string version;
|
||||
const std::string homepage;
|
||||
const std::string email;
|
||||
const std::string maintainer;
|
||||
|
||||
info_file(const std::string& program_name, const std::string& version,
|
||||
const std::string homepage, const std::string& email, const std::string& maintainer);
|
||||
};
|
||||
|
||||
std::optional<info_file> read_slackbuild_info(const std::filesystem::path& info_filepath);
|
||||
void search_for_slackbuilds(std::vector<info_file>& info_files, const std::filesystem::path& directory);
|
||||
}
|
Reference in New Issue
Block a user