diff --git a/librepo.spec b/librepo.spec
index 054e80b..35477fc 100644
--- a/librepo.spec
+++ b/librepo.spec
@@ -10,7 +10,7 @@
 
 Name:           librepo
 Version:        1.8.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Repodata downloading library
 
 License:        LGPLv2+
@@ -117,9 +117,7 @@ pushd build-py3
 popd
 %endif
 
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
+%ldconfig_scriptlets
 
 %files
 %license COPYING
@@ -140,6 +138,9 @@ popd
 %endif
 
 %changelog
+* Wed Jan 31 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-5
+- Switch to %%ldconfig_scriptlets
+
 * Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-4
 - Use better Obsoletes for platform-python