]> git.pld-linux.org Git - packages/rpm-pld-macros.git/commitdiff
- import rpm5 macros that don't exist in rpm.org
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Jan 2020 10:33:49 +0000 (19:33 +0900)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 6 Jan 2020 10:33:49 +0000 (19:33 +0900)
- remove mimetype generator, rpm.org has it's own

attr.gstreamer [new file with mode: 0644]
macros.gstreamer [new file with mode: 0644]
macros.mimetype [deleted file]
macros.selinux [new file with mode: 0644]
rpm-build-macros.spec
rpm-mimetypedeps [deleted file]

diff --git a/attr.gstreamer b/attr.gstreamer
new file mode 100644 (file)
index 0000000..02e23ae
--- /dev/null
@@ -0,0 +1,2 @@
+%__gstreamer_provides  %{_rpmconfigdir}/gstreamer.sh --provides --gst-inspect %__gst_inspect
+#__gstreamer_requires  %{_rpmconfigdir}/gstreamer.sh --requires
diff --git a/macros.gstreamer b/macros.gstreamer
new file mode 100644 (file)
index 0000000..bf64a74
--- /dev/null
@@ -0,0 +1,3 @@
+# Gstreamer specific macro definitions.
+
+%__gst_inspect         /usr/bin/gst-inspect-1.0
diff --git a/macros.mimetype b/macros.mimetype
deleted file mode 100644 (file)
index 5f67ab5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#------------------------------------------------------------------------
-# mimetype(...) configuration.
-#
-# Path to script to autogenerate mimetype(foo) provides, based on MimeType
-# key from desktop files.
-#
-%__mimetype_provides %{_usrlibrpm}/mimetypedeps.sh --provides
diff --git a/macros.selinux b/macros.selinux
new file mode 100644 (file)
index 0000000..f5f5934
--- /dev/null
@@ -0,0 +1,38 @@
+# SELinux specific macro definitions.
+
+# Desired selinux policy tree
+%__policy_tree %{expand:%%global __policy_tree %{lua:\
+t="targeted"\
+f = io.open("/etc/selinux/config")\
+if f then\
+  for l in f:lines() do\
+    if "SELINUXTYPE=" == string.sub(l,0,12) then t=string.sub(l,13); end\
+  end\
+  f:close()\
+end\
+print (t)\
+}}%{__policy_tree}
+
+# Path to selinux file context patterns.
+%__file_context_path /etc/selinux/%{__policy_tree}/contexts/files/file_contexts
+
+#
+# Path to selinux file context patterns used to add
+# RPMTAG_FILECONTEXTS to packages when building.
+#
+# Undefined, missing or %{nil} will disable.
+%_build_file_context_path      %{nil}
+
+#
+# Path to selinux file context patterns used to set
+# (or override package content) file contexts when installing.
+#
+# Undefined, missing or %{nil} will use package content (if available).
+%_install_file_context_path    %{__file_context_path}
+
+#
+# Path to selinux file context patterns used to verify
+# file contexts on file system.
+#
+# Undefined, missing or %{nil} will use package content (if available).
+%_verify_file_context_path     %{__file_context_path}
index 925ed688c83413b0c2053820d5f25cc3ef6dff62..ca9062017039b2987fd65f3eac0be873bad7fe3a 100644 (file)
@@ -47,9 +47,10 @@ Source50:    macros.upstart
 Source51:      macros.webapp
 Source52:      macros.xmms
 Source53:      macros.xorg
+Source54:      macros.selinux
 
-Source60:      rpm-mimetypedeps
-Source61:      macros.mimetypedeps
+Source60:      macros.gstreamer
+Source61:      attr.gstreamer
 
 Patch0:                disable-systemd.patch
 BuildRequires: rpm >= 4.4.9-56
@@ -227,9 +228,10 @@ cp -p %{SOURCE50} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/upstart
 cp -p %{SOURCE51} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/webapp
 cp -p %{SOURCE52} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/xmms
 cp -p %{SOURCE53} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/xorg
+cp -p %{SOURCE54} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/selinux
 
-cp -p %{SOURCE60} $RPM_BUILD_ROOT%{_usrlibrpm}/mimetypedeps.sh
-cp -p %{SOURCE61} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/mimetype
+cp -p %{SOURCE60} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/gstreamer
+cp -p %{SOURCE61} $RPM_BUILD_ROOT%{_usrlibrpm}/fileattrs/gstreamer.attr
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -242,6 +244,7 @@ rm -rf $RPM_BUILD_ROOT
 %files build
 %defattr(644,root,root,755)
 %{_usrlibrpm}/fileattrs/java.attr
+%{_usrlibrpm}/fileattrs/gstreamer.attr
 %{_usrlibrpm}/fileattrs/kernel.attr
 %{_usrlibrpm}/fileattrs/php.attr
 %{_usrlibrpm}/fileattrs/ruby.attr
@@ -250,15 +253,16 @@ rm -rf $RPM_BUILD_ROOT
 %{_usrlibrpm}/macros.d/cacti
 %{_usrlibrpm}/macros.d/emacs
 %{_usrlibrpm}/macros.d/ghc
+%{_usrlibrpm}/macros.d/gstreamer
 %{_usrlibrpm}/macros.d/java
 %{_usrlibrpm}/macros.d/kernel
-%{_usrlibrpm}/macros.d/mimetype
 %{_usrlibrpm}/macros.d/nagios
 %{_usrlibrpm}/macros.d/openldap
 %{_usrlibrpm}/macros.d/perl
 %{_usrlibrpm}/macros.d/php
 %{_usrlibrpm}/macros.d/python
 %{_usrlibrpm}/macros.d/ruby
+%{_usrlibrpm}/macros.d/selinux
 %{_usrlibrpm}/macros.d/systemd
 %{_usrlibrpm}/macros.d/tcl
 %{_usrlibrpm}/macros.d/upstart
@@ -266,7 +270,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_usrlibrpm}/macros.d/xmms
 %{_usrlibrpm}/macros.d/xorg
 
-%attr(755,root,root) %{_rpmlibdir}/mimetypedeps.sh
 %attr(755,root,root) %{_usrlibrpm}/compress-doc
 %attr(755,root,root) %{_usrlibrpm}/dokuwiki-find-lang.sh
 %attr(755,root,root) %{_usrlibrpm}/find-lang.sh
diff --git a/rpm-mimetypedeps b/rpm-mimetypedeps
deleted file mode 100644 (file)
index 6c0176d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-case $1 in
--P|--provides)
-       while read filename; do
-       case "$filename" in
-       *.desktop)
-               mime=$(awk -F= '/^MimeType=/{print $2}' "$filename")
-               IFS=';'
-               for type in $mime; do
-                       if [ -n "$type" ]; then
-                               echo "mimetype($type)"
-                       fi
-               done
-               ;;
-       esac
-       done
-       ;;
-esac
-
-exit 0
This page took 0.525022 seconds and 4 git commands to generate.