~ubuntu-branches/ubuntu/wily/signing-party/wily

« back to all changes in this revision

Viewing changes to gpgdir/packaging/gpgdir.spec

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2009-02-23 21:37:20 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090223213720-98hkq51ynr3oaic7
Tags: 1.1-2
Fix build error when only building the binary package
by fixing the build-arch target (Closes: #516804).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%define name gpgdir
 
2
%define version 1.9.4
 
3
%define release 1
 
4
%define gpgdirlibdir %_libdir/%name
 
5
 
 
6
### get the first @INC directory that includes the string "linux".
 
7
### This may be 'i386-linux', or 'i686-linux-thread-multi', etc.
 
8
%define gpgdirmoddir `perl -e '$path='i386-linux'; for (@INC) { if($_ =~ m|.*/(.*linux.*)|) {$path = $1; last; }} print $path'`
 
9
 
 
10
Summary: Gpgdir recursively encrypts/decrypts directories with GnuPG.
 
11
Name: %name
 
12
Version: %version
 
13
Release: %release
 
14
License: GPL
 
15
Group: Applications/Cryptography
 
16
Url: http://www.cipherdyne.org/gpgdir/
 
17
Source: %name-%version.tar.gz
 
18
BuildRoot: %_tmppath/%{name}-buildroot
 
19
#Prereq: rpm-helper
 
20
 
 
21
%description
 
22
gpgdir is a perl script that uses the CPAN GnuPG::Interface perl module to encrypt
 
23
and decrypt directories using a gpg key specified in ~/.gpgdirrc. gpgdir recursively
 
24
descends through a directory in order to make sure it encrypts or decrypts every file
 
25
in a directory and all of its subdirectories. By default the mtime and atime values
 
26
of all files will be preserved upon encryption and decryption (this can be disabled
 
27
with the --no-preserve-times option). Note that in --encrypt mode, gpgdir will
 
28
delete the original files that it successfully encrypts (unless the --no-delete
 
29
option is given). However, upon startup gpgdir first asks for a the decryption pass-
 
30
word to be sure that a dummy file can successfully be encrypted and decrypted. The
 
31
initial test can be disabled with the --skip-test option so that a directory can eas-
 
32
ily be encrypted without having to also specify a password (this is consistent with
 
33
gpg behavior). Also, note that gpgdir is careful not encrypt hidden files and direc-
 
34
tories. After all, you probably don't want your ~/.gnupg directory or ~/.bashrc file
 
35
to be encrypted.
 
36
 
 
37
%prep
 
38
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
39
 
 
40
%setup -q
 
41
for i in $(grep -r "use lib" . | cut -d: -f1); do
 
42
    awk '/use lib/ { sub("/usr/lib/gpgdir", "%_libdir/%name") } { print }' $i > $i.tmp
 
43
    mv $i.tmp $i
 
44
done
 
45
 
 
46
cd deps
 
47
cd Class-MethodMaker && perl Makefile.PL PREFIX=%gpgdirlibdir LIB=%gpgdirlibdir
 
48
cd ..
 
49
cd GnuPG-Interface && perl Makefile.PL PREFIX=%gpgdirlibdir LIB=%gpgdirlibdir
 
50
cd ..
 
51
cd TermReadKey && perl Makefile.PL PREFIX=%gpgdirlibdir LIB=%gpgdirlibdir
 
52
cd ../..
 
53
 
 
54
%build
 
55
 
 
56
### build perl modules used by gpgdir
 
57
cd deps
 
58
make OPTS="$RPM_OPT_FLAGS" -C Class-MethodMaker
 
59
make OPTS="$RPM_OPT_FLAGS" -C GnuPG-Interface
 
60
make OPTS="$RPM_OPT_FLAGS" -C TermReadKey
 
61
cd ..
 
62
 
 
63
%install
 
64
 
 
65
### gpgdir module dirs
 
66
cd deps
 
67
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Term/ReadKey
 
68
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/array
 
69
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/Engine
 
70
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/hash
 
71
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/scalar
 
72
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/Class/MethodMaker
 
73
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/Term
 
74
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/auto/GnuPG/Interface
 
75
mkdir -p $RPM_BUILD_ROOT%gpgdirlibdir/GnuPG
 
76
mkdir -p $RPM_BUILD_ROOT%_bindir
 
77
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
 
78
mkdir -p $RPM_BUILD_ROOT%_sbindir
 
79
cd ..
 
80
 
 
81
install -m 755 gpgdir $RPM_BUILD_ROOT%_bindir/
 
82
install -m 644 gpgdir.1 $RPM_BUILD_ROOT%{_mandir}/man1/
 
83
 
 
84
### install perl modules used by gpgdir
 
85
cd deps
 
86
install -m 444 Class-MethodMaker/blib/lib/auto/Class/MethodMaker/array/*.* $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/array/
 
87
install -m 444 Class-MethodMaker/blib/lib/auto/Class/MethodMaker/scalar/*.* $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/scalar/
 
88
install -m 444 Class-MethodMaker/blib/lib/auto/Class/MethodMaker/hash/*.* $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/hash/
 
89
install -m 444 Class-MethodMaker/blib/lib/auto/Class/MethodMaker/Engine/*.* $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/Engine/
 
90
install -m 444 Class-MethodMaker/blib/arch/auto/Class/MethodMaker/MethodMaker.bs $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/MethodMaker.bs
 
91
install -m 444 Class-MethodMaker/blib/arch/auto/Class/MethodMaker/MethodMaker.so $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Class/MethodMaker/MethodMaker.so
 
92
install -m 444 Class-MethodMaker/blib/lib/Class/MethodMaker.pm $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/Class/MethodMaker.pm
 
93
install -m 444 Class-MethodMaker/blib/lib/Class/MethodMaker/*.pm $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/Class/MethodMaker
 
94
install -m 444 GnuPG-Interface/blib/lib/auto/GnuPG/Interface/*.* $RPM_BUILD_ROOT%gpgdirlibdir/auto/GnuPG/Interface/
 
95
install -m 444 GnuPG-Interface/blib/lib/GnuPG/*.pm $RPM_BUILD_ROOT%gpgdirlibdir/GnuPG/
 
96
install -m 444 TermReadKey/blib/lib/Term/ReadKey.pm $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/Term/ReadKey.pm
 
97
install -m 444 TermReadKey/blib/lib/auto/Term/ReadKey/autosplit.ix $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Term/ReadKey/autosplit.ix
 
98
install -m 444 TermReadKey/blib/arch/auto/Term/ReadKey/ReadKey.bs $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Term/ReadKey/ReadKey.bs
 
99
install -m 444 TermReadKey/blib/arch/auto/Term/ReadKey/ReadKey.so $RPM_BUILD_ROOT%gpgdirlibdir/%gpgdirmoddir/auto/Term/ReadKey/ReadKey.so
 
100
cd ..
 
101
 
 
102
%clean
 
103
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 
104
 
 
105
%pre
 
106
 
 
107
%post
 
108
 
 
109
%preun
 
110
 
 
111
%files
 
112
%defattr(-,root,root)
 
113
%_bindir/*
 
114
%{_mandir}/man1/*
 
115
%_libdir/%name
 
116
 
 
117
%changelog
 
118
* Thu Feb 12 2009 Michael Rash <mbr@cipherdyne.org>
 
119
- gpgdir-1.9.4 release
 
120
 
 
121
* Wed Nov 11 2008 Michael Rash <mbr@cipherdyne.org>
 
122
- gpgdir-1.9.3 release
 
123
 
 
124
* Sun Aug 31 2008 Michael Rash <mbr@cipherdyne.org>
 
125
- Updated to use the deps/ directory for all perl module sources.
 
126
- gpgdir-1.9.2 release
 
127
 
 
128
* Sat Jun 07 2008 Michael Rash <mbr@cipherdyne.org>
 
129
- gpgdir-1.9.1 release
 
130
 
 
131
* Sat May 31 2008 Michael Rash <mbr@cipherdyne.org>
 
132
- gpgdir-1.9 release
 
133
 
 
134
* Mon Feb 18 2008 Michael Rash <mbr@cipherdyne.org>
 
135
- gpgdir-1.8 release
 
136
 
 
137
* Mon Feb 18 2008 Michael Rash <mbr@cipherdyne.org>
 
138
- gpgdir-1.7 release
 
139
 
 
140
* Sun Feb 17 2008 Michael Rash <mbr@cipherdyne.org>
 
141
- gpgdir-1.6 release
 
142
 
 
143
* Fri Aug 31 2007 Michael Rash <mbr@cipherdyne.org>
 
144
- gpgdir-1.5 release
 
145
 
 
146
* Sat Jul 20 2007 Michael Rash <mbr@cipherdyne.org>
 
147
- gpgdir-1.4 release
 
148
 
 
149
* Sat Jun 09 2007 Michael Rash <mbr@cipherdyne.org>
 
150
- gpgdir-1.3 release
 
151
 
 
152
* Mon May 28 2007 Michael Rash <mbr@cipherdyne.org>
 
153
- gpgdir-1.2 release
 
154
 
 
155
* Mon May 21 2007 Michael Rash <mbr@cipherdyne.org>
 
156
- gpgdir-1.1 release
 
157
 
 
158
* Sun Sep 17 2006 Michael Rash <mbr@cipherdyne.org>
 
159
- gpgdir-1.0.3 release (1.0.2 was skipped accidentally).
 
160
 
 
161
* Sat Sep 16 2006 Michael Rash <mbr@cipherdyne.org>
 
162
- Added x86_64 RPM.
 
163
- Removed iptables as a prerequisite.
 
164
- gpgdir-1.0.1 release
 
165
 
 
166
* Wed Sep 13 2006 Michael Rash <mbr@cipherdyne.org>
 
167
- gpgdir-1.0 release
 
168
 
 
169
* Thu Sep 09 2006 Michael Rash <mbr@cipherdyne.org>
 
170
- Initial RPM release of gpgdir-0.9.9