988bf4b
diff -up ./bin/generate_vcards.rpm ./bin/generate_vcards
381f1c7
--- ./bin/generate_vcards.rpm	2020-01-31 19:50:58.000000000 +0100
381f1c7
+++ ./bin/generate_vcards	2020-02-01 07:56:20.162307853 +0100
988bf4b
@@ -6,8 +6,7 @@ namespace Sabre\VObject;
988bf4b
 // This sucks.. we have to try to find the composer autoloader. But chances
988bf4b
 // are, we can't find it this way. So we'll do our bestest
988bf4b
 $paths = [
988bf4b
-    __DIR__ . '/../vendor/autoload.php',  // In case vobject is cloned directly
988bf4b
-    __DIR__ . '/../../../autoload.php',   // In case vobject is a composer dependency.
988bf4b
+    '/usr/share/php/Sabre/VObject4/autoload.php',  // RPM installation
988bf4b
 ];
988bf4b
 
988bf4b
 foreach($paths as $path) {
988bf4b
@@ -18,7 +17,7 @@ foreach($paths as $path) {
988bf4b
 }
988bf4b
 
988bf4b
 if (!class_exists('Sabre\\VObject\\Version')) {
988bf4b
-    fwrite(STDERR, "Composer autoloader could not be properly loaded.\n");
988bf4b
+    fwrite(STDERR, "Autoloader could not be properly loaded.\n");
988bf4b
     die(1);
988bf4b
 }
988bf4b
 
988bf4b
diff -up ./bin/vobject.rpm ./bin/vobject
381f1c7
--- ./bin/vobject.rpm	2020-01-31 19:50:58.000000000 +0100
381f1c7
+++ ./bin/vobject	2020-02-01 07:56:20.162307853 +0100
988bf4b
@@ -6,8 +6,7 @@ namespace Sabre\VObject;
988bf4b
 // This sucks.. we have to try to find the composer autoloader. But chances
988bf4b
 // are, we can't find it this way. So we'll do our bestest
988bf4b
 $paths = [
988bf4b
-    __DIR__ . '/../vendor/autoload.php',  // In case vobject is cloned directly
988bf4b
-    __DIR__ . '/../../../autoload.php',   // In case vobject is a composer dependency.
988bf4b
+    '/usr/share/php/Sabre/VObject4/autoload.php',  // RPM installation
988bf4b
 ];
988bf4b
 
988bf4b
 foreach($paths as $path) {
988bf4b
@@ -18,7 +17,7 @@ foreach($paths as $path) {
988bf4b
 }
988bf4b
 
988bf4b
 if (!class_exists('Sabre\\VObject\\Version')) {
988bf4b
-    fwrite(STDERR, "Composer autoloader could not be loaded.\n");
988bf4b
+    fwrite(STDERR, "Autoloader could not be loaded.\n");
988bf4b
     die(1);
988bf4b
 }
988bf4b
 
988bf4b
diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
381f1c7
--- ./tests/bootstrap.php.rpm	2020-01-31 19:50:58.000000000 +0100
381f1c7
+++ ./tests/bootstrap.php	2020-02-01 07:57:56.802761882 +0100
988bf4b
@@ -3,8 +3,7 @@
988bf4b
 date_default_timezone_set('UTC');
988bf4b
 
988bf4b
 $try = [
b6eac28
-    __DIR__.'/../vendor/autoload.php',
b6eac28
-    __DIR__.'/../../../autoload.php',
988bf4b
+    '@BUILDROOT@/usr/share/php/Sabre/VObject4/autoload.php',  // RPM installation
988bf4b
 ];
988bf4b
 
988bf4b
 foreach ($try as $path) {
381f1c7
@@ -13,3 +12,6 @@ foreach ($try as $path) {
381f1c7
         break;
988bf4b
     }
988bf4b
 }
381f1c7
+
988bf4b
+\Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject');
b2bf577
+