Imported new upstream release for gpgdir.
[pgp-tools.git] / gpgdir / packaging / gpgdir-nobuildreqs.spec
1 %define name gpgdir
2 %define version 1.9.5
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 * Sat Sep 05 2009 Michael Rash <mbr@cipherdyne.org>
119 - gpgdir-1.9.5 release
120
121 * Thu Feb 12 2009 Michael Rash <mbr@cipherdyne.org>
122 - gpgdir-1.9.4 release
123
124 * Wed Nov 11 2008 Michael Rash <mbr@cipherdyne.org>
125 - gpgdir-1.9.3 release
126
127 * Sun Aug 31 2008 Michael Rash <mbr@cipherdyne.org>
128 - Updated to use the deps/ directory for all perl module sources.
129 - gpgdir-1.9.2 release
130
131 * Sat Jun 07 2008 Michael Rash <mbr@cipherdyne.org>
132 - gpgdir-1.9.1 release
133
134 * Sat May 31 2008 Michael Rash <mbr@cipherdyne.org>
135 - gpgdir-1.9 release
136
137 * Mon Feb 18 2008 Michael Rash <mbr@cipherdyne.org>
138 - gpgdir-1.8 release
139
140 * Mon Feb 18 2008 Michael Rash <mbr@cipherdyne.org>
141 - gpgdir-1.7 release
142
143 * Sun Feb 17 2008 Michael Rash <mbr@cipherdyne.org>
144 - gpgdir-1.6 release
145
146 * Fri Aug 31 2007 Michael Rash <mbr@cipherdyne.org>
147 - gpgdir-1.5 release
148
149 * Sat Jul 20 2007 Michael Rash <mbr@cipherdyne.org>
150 - gpgdir-1.4 release
151
152 * Sat Jun 09 2007 Michael Rash <mbr@cipherdyne.org>
153 - gpgdir-1.3 release
154
155 * Mon May 28 2007 Michael Rash <mbr@cipherdyne.org>
156 - gpgdir-1.2 release
157
158 * Mon May 21 2007 Michael Rash <mbr@cipherdyne.org>
159 - gpgdir-1.1 release
160
161 * Sun Sep 17 2006 Michael Rash <mbr@cipherdyne.org>
162 - gpgdir-1.0.3 release (1.0.2 was skipped accidentally).
163
164 * Sat Sep 16 2006 Michael Rash <mbr@cipherdyne.org>
165 - Added x86_64 RPM.
166 - Removed iptables as a prerequisite.
167 - gpgdir-1.0.1 release
168
169 * Wed Sep 13 2006 Michael Rash <mbr@cipherdyne.org>
170 - gpgdir-1.0 release
171
172 * Thu Sep 09 2006 Michael Rash <mbr@cipherdyne.org>
173 - Initial RPM release of gpgdir-0.9.9