Sfoglia il codice sorgente

Disable autoreqprov, as that is considered harmful.

Also target noarch, as that's more accurate
Andy Baugh 5 anni fa
parent
commit
cd5e052082
2 ha cambiato i file con 17 aggiunte e 4 eliminazioni
  1. 1 1
      Makefile
  2. 16 3
      SPECS/BetterPostgres.spec

+ 1 - 1
Makefile

@@ -60,5 +60,5 @@ rpm:
 	cp $(pwd)/Makefile SOURCES/BetterPostgres4cP-1.0/Makefile
 	cp $(pwd)/configure SOURCES/BetterPostgres4cP-1.0/configure
 	cd SOURCES && tar --exclude="*.swp" --exclude="*.swn" --exclude="*.swo" -ch BetterPostgres4cP-1.0 | gzip > ~/rpmbuild/SOURCES/BetterPostgres4cP-1.0.tar.gz
-	rpmbuild -ba --clean SPECS/BetterPostgres.spec
+	rpmbuild -ba --clean --target noarch SPECS/BetterPostgres.spec
 	rm -rf SOURCES/*

+ 16 - 3
SPECS/BetterPostgres.spec

@@ -5,11 +5,16 @@ Summary: Better PostgreSQL management for cPanel hosts
 
 Group: Plugins
 License: Troglodyne
-URL: https://troglodyne.net/betterpostgres
+URL: https://troglodyne.net/better-postgres-for-cpanel
 Source0: BetterPostgres4cP-%{version}.tar.gz
 
-BuildRequires: make perl
-Requires: perl
+# No real way to tell it what version of cpanel-perl libs it needs,
+# as each of these are named like cpanel-perl-5xx-Module-Name.
+# This makes your RPM break every time they upgrade perl.
+# As such, just require the symlink to the binary and "pray it goes ok"
+AutoReqProv: no
+BuildRequires: make
+Requires: /usr/local/cpanel/3rdparty/bin/perl
 
 %description
 Plugin for more advanced management of PostgreSQL on cPanel systems
@@ -40,6 +45,14 @@ make install DESTDIR=%{buildroot}
 /var/cpanel/apps/troglodyne_api.conf
 /var/cpanel/apps/better_postgres.conf
 
+%pre
+/usr/local/cpanel/bin/unregister_appconfig troglodyne_api
+/usr/local/cpanel/bin/unregister_appconfig better_postgres
+
+%post
+/usr/local/cpanel/bin/register_appconfig /var/cpanel/apps/troglodyne_api.conf
+/usr/local/cpanel/bin/register_appconfig /var/cpanel/apps/better_postgres.conf
+
 %changelog
 * Tue Apr 14 2020 George S. Baugh <george@troglodyne.net> - 1.0.1
 - Initial Release