+# check the library logic
+
+fakepkg() {
+zpm-shell $PF "insert into packages (package,version,release,status)
+ values ('$1','$2',1,NULL)"
+}
+
+fakelib() {
+ hash="hv.$3.so.$4"
+ soname="lib$3.so.$4"
+ path="/lib/$soname"
+ hash="$path"
+zpm-shell $PF "insert into packagefiles (package,version,release,path,hash)
+ values ('$1','$2',1,'$path','$hash');"
+zpm-shell $PF "insert into elflibraries (file,soname)
+ values ('$hash','$soname');"
+ if [ -n "$5" ]; then
+ dep="lib$5.so.$6"
+ zpm-shell $PF "insert into elfneeded (file,needed)
+ values ('$hash','$dep');"
+ fi
+}
+
+fakeprg() {
+ hash="hv.$2.$3"
+ path="/bin/$3 ($2)"
+ hash="$path"
+zpm-shell $PF "insert into packagefiles (package,version,release,path,hash)
+ values ('$1','$2',1,'$path','$hash');"
+ if [ -n "$4" ]; then
+ dep="lib$4.so.$5"
+ zpm-shell $PF "insert into elfneeded (file,needed)
+ values ('$hash','$dep');"
+ fi
+}