]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/packaging/autorandr.spec
Removed pm-utils on fedora22+ from requisites
[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.1
11 Release:        2%{?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:       systemd
20 %if 0%{?use_pm_utils}
21 Requires:       pm-utils
22 %endif
23
24 %description
25
26
27 %prep
28 %setup -q
29
30 %build
31
32 %install
33
34 install -D -m 755 autorandr.py %{buildroot}%{_bindir}/autorandr
35 install -D -m 644 contrib/bash_completion/autorandr %{buildroot}%{_datarootdir}/autorandr/completions/autorandr
36 install -d -m 755 %{buildroot}%{_datarootdir}/bash-completion/completions
37 ln -s ../../autorandr/completions/autorandr %{buildroot}%{_datarootdir}/bash-completion/completions/autorandr
38 install -D -m 755 contrib/pm-utils/40autorandr %{buildroot}%{_sysconfdir}/pm/sleep.d/40autorandr
39 install -D -m 644 contrib/systemd/autorandr.service %{buildroot}%{_sysconfdir}/systemd/system/autorandr.service
40 #install -D -m 644 contrib/udev/40-monitor-hotplug.rules %{buildroot}%{_sysconfdir}/udev/rules.d/40-monitor-hotplug.rules
41 install -D -m 644 contrib/etc/xdg/autostart/autorandr.desktop %{buildroot}%{_sysconfdir}/etc/xdg/autostart/autorandr.desktop
42
43 %files
44 %defattr(-,root,root,-)
45
46 %license gpl-3.0.txt 
47 %doc README.md
48 %{_bindir}/*
49 %config(noreplace) %{_sysconfdir}/*
50 %{_datarootdir}/autorandr/*
51 %{_datarootdir}/bash-completion/completions/autorandr
52
53 #%post
54 #udevadm control --reload-rules
55
56
57 %changelog
58 * Sun Oct 01 2017 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 1.1-2
59 - Added conditionals for pm-utils, compability with Fedora26+
60 - Removed bash-completion from requisites
61 - Removed udev from requisites
62 * Sun Sep 03 2017 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 1.1-1
63 - Update to stable 1.1
64 * Fri Feb 17 2017 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20170217git-1
65 - Update to master
66 * Wed Jul 6 2016 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20160706git-1
67 - Set default value of $XDG_CONFIG_DIRS to fulfill the standard
68 * Fri Jul 1 2016 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20160701git-1.1
69 - fixed running udevadm in post
70 * Fri Jul 1 2016 Jerzy Drozdz <rpmbuilder@jdsieci.pl> - 20160701git-1
71 - initial build