]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/packaging/autorandr.spec
1b4877cbd4327a3d22a7ed4d01a8d41ea4d270da
[deb_pkgs/autorandr.git] / contrib / packaging / autorandr.spec
1 %define use_pm_utils 1
2 %if 0%{?fedora} > 22
3 %define use_pm_utils 0
4 %endif
5 %if 0%{?rhel} > 7
6 %define use_pm_utils 0
7 %endif
8
9 Name:           autorandr
10 Version:        1.7
11 Release:        1%{?dist}
12 Summary:        Automatically select a display configuration based on connected devices
13
14 License:        GPL
15 URL:            https://github.com/phillipberndt/autorandr
16 Source0:        https://github.com/phillipberndt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
17
18 BuildArch:      noarch
19 Requires:       python2
20 %if 0%{?use_pm_utils}
21 Requires:       pm-utils
22 %endif
23 %{?systemd_ordering}
24 BuildRequires: systemd
25
26 %description
27
28
29 %prep
30 %setup -q
31
32 %build
33
34 %install
35
36 install -D -m 755 autorandr.py %{buildroot}%{_bindir}/autorandr
37 install -D -m 644 contrib/bash_completion/autorandr %{buildroot}%{_datarootdir}/autorandr/completions/autorandr
38 install -d -m 755 %{buildroot}%{_datarootdir}/bash-completion/completions
39 ln -s ../../autorandr/completions/autorandr %{buildroot}%{_datarootdir}/bash-completion/completions/autorandr
40 install -D -m 755 contrib/pm-utils/40autorandr %{buildroot}%{_sysconfdir}/pm/sleep.d/40autorandr
41 install -D -m 644 contrib/systemd/autorandr.service %{buildroot}%{_unitdir}/autorandr.service
42 #install -D -m 644 contrib/udev/40-monitor-hotplug.rules %{buildroot}%{_sysconfdir}/udev/rules.d/40-monitor-hotplug.rules
43 install -D -m 644 contrib/etc/xdg/autostart/autorandr.desktop %{buildroot}%{_sysconfdir}/etc/xdg/autostart/autorandr.desktop
44
45 %files
46 %defattr(-,root,root,-)
47 %attr(0644,root,root) %{_unitdir}/autorandr.service
48
49 %license gpl-3.0.txt 
50 %doc README.md
51 %{_bindir}/*
52 %config(noreplace) %{_sysconfdir}/*
53 %{_datarootdir}/autorandr/*
54 %{_datarootdir}/bash-completion/completions/autorandr
55
56 #%post
57 #udevadm control --reload-rules
58
59
60 %changelog
61 * Fri Sep 28 2018 Maciej Sitarz <macieksitarz@wp.pl> - 1.7-1
62 - Updated to stable 1.7
63 * Thu Jul 19 2018 Maciej Sitarz <macieksitarz@wp.pl> - 1.5-1
64 - Updated to stable 1.5
65 - Changed dest path for systemd service file
66 * Sun Oct 01 2017 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 1.1-2
67 - Added conditionals for pm-utils, compability with Fedora26+
68 - Removed bash-completion from requisites
69 - Removed udev from requisites
70 * Sun Sep 03 2017 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 1.1-1
71 - Update to stable 1.1
72 * Fri Feb 17 2017 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20170217git-1
73 - Update to master
74 * Wed Jul 6 2016 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20160706git-1
75 - Set default value of $XDG_CONFIG_DIRS to fulfill the standard
76 * Fri Jul 1 2016 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20160701git-1.1
77 - fixed running udevadm in post
78 * Fri Jul 1 2016 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20160701git-1
79 - initial build