CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Replaced libdir value in .la files instead of remove them
[pkgutils-cross.git] / pkgadd.h
index 46e0f1bef99dcc62e2465cc529b05d86107352aa..0879808a44698ffc6c0af38ec30b43148864bf2b 100644 (file)
--- a/pkgadd.h
+++ b/pkgadd.h
@@ -2,6 +2,7 @@
 //  pkgutils
 // 
 //  Copyright (c) 2000-2005 Per Liden
+//  Copyright (c) 2006-2013 by CRUX team (http://crux.nu)
 // 
 //  This program is free software; you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
 #define PKGADD_CONF             "/etc/pkgadd.conf"
 #define PKGADD_CONF_MAXLINE     1024
 
+enum rule_event_t {
+       UPGRADE,
+       INSTALL
+};
+
 struct rule_t {
-       enum { UPGRADE } event;
+       rule_event_t event;
        string pattern;
        bool action;
 };
@@ -42,8 +48,11 @@ public:
        virtual void print_help() const;
 
 private:
-       vector<rule_t> read_config() const;
+       vector<rule_t> read_config(string file) const;
        set<string> make_keep_list(const set<string>& files, const vector<rule_t>& rules) const;
+       set<string> apply_install_rules(const string& name, pkginfo_t& info, const vector<rule_t>& rules);
+       void find_rules(const vector<rule_t>& rules, rule_event_t event, vector<rule_t>& found) const;
+       bool rule_applies_to_file(const rule_t& rule, const string& file) const;
 };
 
 #endif /* PKGADD_H */