]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blob - contrib/packaging/autorandr.spec
Set systemd dependency to get it's macros
[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.5.1
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 URL:            https://github.com/maciex/autorandr
18 Source0:        https://github.com/maciex/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
19
20 BuildArch:      noarch
21 Requires:       python2
22 %if 0%{?use_pm_utils}
23 Requires:       pm-utils
24 %endif
25 %{?systemd_ordering}
26 BuildRequires: systemd
27
28 %description
29
30
31 %prep
32 %setup -q
33
34 %build
35
36 %install
37
38 install -D -m 755 autorandr.py %{buildroot}%{_bindir}/autorandr
39 install -D -m 644 contrib/bash_completion/autorandr %{buildroot}%{_datarootdir}/autorandr/completions/autorandr
40 install -d -m 755 %{buildroot}%{_datarootdir}/bash-completion/completions
41 ln -s ../../autorandr/completions/autorandr %{buildroot}%{_datarootdir}/bash-completion/completions/autorandr
42 install -D -m 755 contrib/pm-utils/40autorandr %{buildroot}%{_sysconfdir}/pm/sleep.d/40autorandr
43 install -D -m 644 contrib/systemd/autorandr.service %{buildroot}%{_unitdir}/autorandr.service
44 #install -D -m 644 contrib/udev/40-monitor-hotplug.rules %{buildroot}%{_sysconfdir}/udev/rules.d/40-monitor-hotplug.rules
45 install -D -m 644 contrib/etc/xdg/autostart/autorandr.desktop %{buildroot}%{_sysconfdir}/etc/xdg/autostart/autorandr.desktop
46
47 %files
48 %defattr(-,root,root,-)
49 %attr(0644,root,root) %{_unitdir}/autorandr.service
50
51 %license gpl-3.0.txt 
52 %doc README.md
53 %{_bindir}/*
54 %config(noreplace) %{_sysconfdir}/*
55 %{_datarootdir}/autorandr/*
56 %{_datarootdir}/bash-completion/completions/autorandr
57
58 #%post
59 #udevadm control --reload-rules
60
61
62 %changelog
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