summaryrefslogtreecommitdiffabout
path: root/lib/SlackBuild/Request/Loader/dir.pm
Side-by-side diff
Diffstat (limited to 'lib/SlackBuild/Request/Loader/dir.pm') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/SlackBuild/Request/Loader/dir.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/SlackBuild/Request/Loader/dir.pm b/lib/SlackBuild/Request/Loader/dir.pm
new file mode 100644
index 0000000..5e2af9d
--- a/dev/null
+++ b/lib/SlackBuild/Request/Loader/dir.pm
@@ -0,0 +1,21 @@
+package SlackBuild::Request::Loader::dir;
+use strict;
+use warnings;
+use File::Basename;
+use File::Spec;
+
+our $PRIORITY = 20;
+
+sub Load {
+ my ($class, $reqname) = @_;
+ if (-d $reqname) {
+ if (my $file =
+ (glob File::Spec->catfile($reqname, '*.SlackBuild'))[0]) {
+ my ($package,$path) = fileparse($file, '.SlackBuild');
+ return { package => $package, slackbuild_uri => $path };
+ }
+ }
+}
+
+1;
+

Return to:

Send suggestions and report system problems to the System administrator.