summaryrefslogtreecommitdiffstats
path: root/redhat/extras/fileshareset/fileshareset.spec
blob: 408798e2837aa316b3749458fe66ce3520526390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# spec file for package fileshareset
#
# Copyright (c) 2014 Trinity Desktop Environment
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http:/www.trinitydesktop.org/
#

# Extract from 'fileshareset.cpp'
#copyright            : (C) 2003 SuSE AG 
#email                : Uwe.Gansert@suse.de

Name:		fileshareset
Version:	2.0
Release:	1%{?dist}
Summary:	Set and list fileshares
Group:		System/Management
URL:		http://www.trinitydesktop.org/

%if 0%{?suse_version}
License:	GPL-2.0+
%else
License:	GPLv2+
%endif

#Vendor:		Trinity Project
#Packager:	Francois Andriot <francois.andriot@free.fr>

Prefix:		/usr
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source0:        %{name}-%{version}.tar.gz

# for set_permissions macro
%if 0%{?suse_version}
PreReq: permissions
%endif

BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:  gcc-c++

#Requires:       

%description
This package contains the the fileshareset utility to allow users to
add or remove file shares.  It's also possible to list currently shared
locations. /etc/security/fileshare.conf is the main configuration file
This utility was originally written for openSUSE KDE3.


%prep
%setup -q -n fileshareset2
aclocal
autoconf
automake -a -c


%build
export CXXFLAGS="$CXXFLAGS -fPIE"
export CFLAGS="$CFLAGS -fPIE"
export LDFLAGS="$LDFLAGS -pie"
%configure
%__make %{?_smp_mflags}


%install
%__rm -rf $RPM_BUILD_ROOT
%__make install DESTDIR=$RPM_BUILD_ROOT

# Install the man page
%__install -D -m 644 man/fileshareset.8 %{?buildroot}%{_mandir}/man8/fileshareset.8

# Install the default configuration file
mkdir -p "${RPM_BUILD_ROOT}%{_sysconfdir}/security/"
echo "RESTRICT=yes" > "${RPM_BUILD_ROOT}%{_sysconfdir}/security/fileshare.conf"


%clean
%__rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{_bindir}/filesharelist
%{_mandir}/man8/fileshareset.8*
%config(noreplace) %{_sysconfdir}/security/fileshare.conf

# Setuid program
%if 0%{?suse_version}
%verify(not mode) %{_bindir}/fileshareset
%else
%attr(4755,root,root) %{_bindir}/fileshareset
%endif


%if 0%{?suse_version}
# Check permissions on setuid files (openSUSE specific)
%verifyscript
%verify_permissions -e /usr/bin/fileshareset
%endif


%changelog
* Sun Oct 5 2014 François Andriot <francois.andriot@free.fr> - 2.0-1
- Initial build for TDE R14