netatalk-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. %bcond_with systemd
  2. %global tracker_api 2.0
  3. ################################################# BASIC PACKAGE INFORMATION
  4. Summary: AFP fileserver for Macintosh clients
  5. Summary(ja): Macintoshクライアント向けのAFPファイルサーバー
  6. Name: netatalk
  7. Version: 3.1.12
  8. Release: 3%{_dist_release}%{?with_systemd:.systemd}
  9. Group: servers
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. Packager: shaolin, tomop
  13. License: GPLv2+
  14. URL: http://netatalk.sourceforge.net/
  15. Source0: %{name}-%{version}.tar.bz2
  16. Source1: netatalk.pam-system-auth
  17. Source2: netatalk.conf
  18. Patch0: netatalk-3.0.1-basedir.patch
  19. Patch1: netatalk-systemd-execstartpre.patch
  20. # https://github.com/Netatalk/Netatalk/pull/110
  21. Patch2: netatalk-fix-incorrect-fsf-address.patch
  22. # https://github.com/Netatalk/Netatalk/pull/113
  23. Patch3: netatalk-afpstats-python3-compat.patch
  24. # https://github.com/Netatalk/Netatalk/pull/125
  25. Patch4: netatalk-invalid_dircache_entries.patch
  26. ############################################################## REQUIREMENTS
  27. BuildRequires: cracklib openssl-devel pam quota libtool automake
  28. BuildRequires: autoconf libdb-devel pam-devel libgcrypt-devel
  29. BuildRequires: avahi-devel libacl-devel openldap-devel
  30. BuildRequires: dbus-devel dbus-glib-devel glib2-devel
  31. BuildRequires: libevent-devel libtdb-devel libmariadb-devel
  32. BuildRequires: tracker-devel
  33. Requires: dbus-python3
  34. Requires: dconf
  35. Requires(post): /sbin/ldconfig
  36. Requires(postun): /sbin/ldconfig
  37. %if %{with systemd}
  38. BuildRequires: systemd
  39. %{?systemd_requires}
  40. %else
  41. Requires(post): /sbin/chkconfig
  42. Requires(preun): /sbin/chkconfig
  43. Requires(preun): /sbin/service
  44. Requires(postun): /sbin/service
  45. %endif
  46. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  47. %description
  48. Netatalk is a freely-available Open Source AFP fileserver. A *NIX/*BSD
  49. system running Netatalk is capable of serving many Macintosh clients
  50. simultaneously as an AppleShare file server (AFP).
  51. %description -l ja
  52.  Netatalkは自由に利用可能なオープンソースAFPファイルサーバーです。
  53. Netatalkを実行している*NIX/*BSDシステムでは、多くのMacintoshクライ
  54. アントに対してAppleShareファイルサーバー(AFP)としてサービスを提供
  55. 可能です。
  56. %package devel
  57. Summary: Headers for Netatalk development
  58. Summary(ja): Netatalk開発用ヘッダファイル
  59. Group: programming
  60. %description devel
  61. This package contains the header files for Netatalk.
  62. %debug_package
  63. %prep
  64. %setup -q
  65. %autopatch -p1
  66. rm -frv libevent/
  67. ln -s ./NEWS ChangeLog
  68. # Avoid re-running the autotools
  69. touch -r aclocal.m4 configure configure.ac macros/gssapi-check.m4
  70. # fix permissions
  71. find include \( -name '*.h' -a -executable \) -exec chmod -x {} \;
  72. # Don't call systemctl daemon-reload during the build
  73. sed -i 's\-systemctl daemon-reload\\g' distrib/initscripts/Makefile.in
  74. %build
  75. %configure \
  76. --disable-silent-rules \
  77. --disable-static \
  78. --enable-shared \
  79. --localstatedir=%{_localstatedir}/lib \
  80. --with-pkgconfdir=%{_sysconfdir}/netatalk \
  81. --with-cracklib \
  82. --with-pam \
  83. --with-shadow \
  84. --with-uams-path=%{_libdir}/netatalk \
  85. --enable-shared \
  86. --enable-krbV-uam \
  87. --enable-overwrite \
  88. --with-gnu-ld \
  89. %if %{with systemd}
  90. --with-lockfile=/run/lock/netatalk/netatalk \
  91. --with-init-style=redhat-systemd \
  92. --with-init-dir=%{_unitdir} \
  93. %else
  94. --with-init-style=redhat-sysv \
  95. %endif
  96. --with-libgcrypt \
  97. --without-libevent \
  98. --without-tdb \
  99. --with-pam-confdir=%{_sysconfdir}/pam.d \
  100. --with-dbus-sysconf-dir=%{_sysconfdir}/dbus-1/system.d \
  101. -with-spotlight \
  102. --with-tracker-pkgconfig-version=%{tracker_api}
  103. make %{?_smp_mflags} all
  104. %install
  105. ### INSTALL (USING "make install") ###
  106. rm -rf ${RPM_BUILD_ROOT}
  107. make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
  108. # install our tmpfiles config
  109. install -Dpm644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/netatalk.conf
  110. # install example config files in doc
  111. mkdir config.example
  112. cp -fp config/afp.conf config.example
  113. cp -fp config/extmap.conf config.example
  114. mkdir -p $RPM_BUILD_ROOT/usr/share/netatalk
  115. cp -fp %{SOURCE1} config.example
  116. # XXX bad hack until this file is updated in glibc-headers:
  117. rm -f $RPM_BUILD_ROOT/usr/include/netatalk/at.h
  118. # Clean up .a and .la files
  119. find $RPM_BUILD_ROOT -name \*.a -exec rm {} \;
  120. find $RPM_BUILD_ROOT -name \*.la -exec rm {} \;
  121. # Fix python shebang
  122. sed -i 's\^#!/usr/bin/env python$\#!%{__python3}\' %{buildroot}/usr/bin/afpstats
  123. %clean
  124. rm -rf ${RPM_BUILD_ROOT}
  125. %post
  126. if [ -e /var/netatalk/afp_signature.conf -a ! -e /var/lib/netatalk/afp_signature.conf ]; then
  127. mv -f /var/netatalk/afp_signature.conf /var/lib/netatalk/
  128. fi
  129. if [ -e /etc/netatalk/afp_signature.conf -a ! -e /var/lib/netatalk/afp_signature.conf ]; then
  130. mv -f /etc/netatalk/afp_signature.conf /var/lib/netatalk/
  131. fi
  132. if [ -e /var/netatalk/afp_voluuid.conf -a ! -e /var/lib/netatalk/afp_voluuid.conf ]; then
  133. mv -f /var/netatalk/afp_voluuid.conf /var/lib/netatalk/
  134. fi
  135. if [ -e /etc/netatalk/afp_voluuid.conf -a ! -e /var/lib/netatalk/afp_voluuid.conf ]; then
  136. mv -f /etc/netatalk/afp_voluuid.conf /var/lib/netatalk/
  137. fi
  138. %if %{with systemd}
  139. %systemd_post %{name}.service
  140. %else
  141. /sbin/chkconfig --add netatalk
  142. %endif
  143. %preun
  144. %if %{with systemd}
  145. %systemd_preun %{name}.service
  146. %else
  147. if [ "$1" = "0" -o -x /bin/systemctl ] ; then
  148. # check for existence due to renaming initscript
  149. if [ -x %{_initrddir}/netatalk ] ; then
  150. /sbin/service netatalk stop > /dev/null 2>&1
  151. /sbin/chkconfig --del netatalk
  152. fi
  153. fi
  154. %endif
  155. %postun
  156. %if %{with systemd}
  157. %systemd_postun_with_restart %{name}.service
  158. %else
  159. if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then
  160. /sbin/service netatalk condrestart > /dev/null 2>&1 || :
  161. fi
  162. %endif
  163. %files
  164. %defattr(-,root,root)
  165. %license COPYING COPYRIGHT
  166. %doc NEWS
  167. %doc config.example
  168. %if %{with systemd}
  169. %{_unitdir}/netatalk.service
  170. %{_tmpfilesdir}/netatalk.conf
  171. %else
  172. %attr(755,root,root) %{_initrddir}/netatalk
  173. %endif
  174. %dir %{_sysconfdir}/netatalk
  175. %config(noreplace) %{_sysconfdir}/netatalk/afp.conf
  176. %config(noreplace) %{_sysconfdir}/netatalk/extmap.conf
  177. %config(noreplace) %{_sysconfdir}/netatalk/dbus-session.conf
  178. %config(noreplace) %{_sysconfdir}/pam.d/netatalk
  179. %config(noreplace) %{_sysconfdir}/dbus-1/system.d/netatalk-dbus.conf
  180. %{_sbindir}/*
  181. %{_bindir}/*
  182. %exclude %{_bindir}/netatalk-config
  183. %{_mandir}/man*/*
  184. %exclude %{_mandir}/man*/netatalk-config*
  185. %{_datadir}/netatalk
  186. %{_libdir}/*.so
  187. %{_libdir}/*.so.*
  188. %dir %{_libdir}/netatalk
  189. %{_libdir}/netatalk/*.so
  190. %{_localstatedir}/lib/netatalk
  191. %files devel
  192. %defattr(-,root,root)
  193. %license COPYING COPYRIGHT
  194. %dir %{_includedir}/atalk
  195. %attr(0644,root,root) %{_includedir}/atalk/*
  196. %{_datadir}/aclocal/netatalk.m4
  197. %{_bindir}/netatalk-config
  198. %{_mandir}/man*/netatalk-config.1*
  199. %changelog
  200. * Sat Mar 13 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.12-3
  201. - rebuilt with current environment.
  202. - cleaned up BR.
  203. * Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.12-2
  204. - rebuilt with libevent-2.1.11.
  205. - added systemd support (disabled as default).
  206. * Mon Jan 07 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.12-1
  207. - new upstream release.
  208. * Sun Nov 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.11-2
  209. - rebuilt with openssl-1.1.1 and libevent-2.1.8.
  210. * Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.11-1
  211. - new upstream release.
  212. * Wed Jul 20 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.9-1
  213. - new upstream release.
  214. - dropped Patch1: fixed in upstream.
  215. * Wed Dec 30 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.8-2
  216. - added Patch1.
  217. * Wed Dec 30 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.8-1
  218. - new upstream release.
  219. * Tue Jun 16 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.7-1
  220. - new upstream release.
  221. * Mon Dec 1 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 2.2.2-2
  222. - rebuilt with libgcrypt 1.6.0 and libdb 5.3.28
  223. * Thu Apr 26 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.2.2-1
  224. - new upstream release.
  225. - added build option 'force_uidgid'.
  226. * Sun Sep 18 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.1-1
  227. - new upstream release
  228. - fix configure options; add missing BRs
  229. * Thu Jul 28 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.0-3
  230. - now back from the upstream confusion (and one more or two...)
  231. new upstream release 2.2.0 at the official site
  232. * Mon Jul 25 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.0-2
  233. - fix Patch10 to follow HAT-san's strong and confident objection
  234. (no need to set ATALK_NAME explicitly in netatalk.conf)
  235. * Sat Jul 23 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.0-1
  236. - new upstream release (at http://www003.upp.so-net.ne.jp/hat/netatalk/)
  237. - add Source100 to add one missing header file in the tarball
  238. - revise Patch10
  239. - explicitly specify --disable-ddp for the first time
  240. * Wed May 04 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.1.5-1
  241. - new upstream release
  242. * Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.1.3-3
  243. - rebuild with openssl-1.0.0c
  244. * Sun Jul 25 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.1.3-2
  245. - fix Patch10 & update description - upon HAT-san's suggestions
  246. * Sun Jul 25 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.1.3-1
  247. - new upstream release
  248. - update Vine patch
  249. * Thu Feb 11 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.5-1
  250. - new upstream release
  251. * Sun May 31 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.4-1
  252. - new upstream release
  253. * Sun Mar 8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.3-7
  254. - rebuilt both for VineSeed / VinePlus-4.0
  255. * Fri Jul 25 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-6
  256. - updated to the cjk-6 patch
  257. - Patch11/12 updated - VineSeed is now set with ja_JP.UTF-8 locale
  258. - Patch14 updated for db46
  259. * Sun Apr 20 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-5
  260. - remove openslp dependency
  261. * Tue Apr 15 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-4
  262. - add Patch11 for Vine's default setting (volcharset:EUC-JP, etc.)
  263. - TODO: remember to revise this fix after VineSeed changes default locale
  264. from ja_JP.eucJP (current) to ja_JP.UTF-8 (near future)
  265. * Tue Apr 15 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-3
  266. - revise description (thanks HAT-san for pointing this out)
  267. - run libtoolize/aclocal/auto{make,conf,header} before doing configure
  268. (without this, uams_* modules won't get .so suffix)
  269. * Mon Apr 14 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-2
  270. - Patch10 updated; dropped Patch11, Patch12, Source10 and Source11
  271. (Patch10 now includes all the modifications and more fixes)
  272. * Fri Apr 11 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.0.3-1
  273. - add patch13 and patch14 for db-4.3.
  274. - move files in %%_libexecdir to %%libdir.
  275. * Sat Oct 21 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0.3-0vl1
  276. - updated to 2.0.3 release w/ cjk patches (see the above Patch section)
  277. * Tue Oct 19 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0-0vl4
  278. - security fix: added Patch10 (CAN-2004-0974)
  279. * Tue Oct 19 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0-0vl3
  280. - configure --with-cnid-default-backend=dbd (cdb seems to be unstable)
  281. * Wed Oct 13 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.0-0vl1
  282. - updated to 2.0 with cjk patch
  283. (see the above Patch section for details)
  284. * Tue May 28 2002 Masaki Shinomiya <shino@pos.to> 1.5.3.1-0vl4
  285. - merge the patch repairing bug for System 7.5.5
  286. - (patch6 netatalk-1.5.3.oldsys.patch)
  287. - made by Akihiro Okamaoto <med012@art.osaka-med.ac.jp>
  288. - patch6 addupted no matter noeuc is, license GPL, URL in comment
  289. * Sat Apr 27 2002 Masaki Shinomiya <shino@pos.to> 1.5.3.1-0vl3
  290. - euc and kana patch originally by
  291. - Akihiro Okamoto <med012@art.osaka-med.ac.jp> against netatalk-1.4b2+asun2.1.3
  292. - applied to netatalk-1.5.2 by me
  293. - README.vine
  294. - omit VERSION from doc, omit perl from require
  295. * Wed Apr 24 2002 Masaki Shinomiya <shino@pos.to> 1.5.3.1-0vl2
  296. - this package is removed because the release number duplicated
  297. * Mon Apr 01 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.3.1-0vl2
  298. - move acleandir.rc to the doc directory, remove executable flag.
  299. * Sun Mar 31 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.3.1-0vl1
  300. - updated to new upstream release
  301. * Fri Mar 01 2002 Toru Sagami <sagami@vinelinux.org> 1.5.2-0vl3
  302. - added Japanese Summary for devel and corrected Group
  303. * Thu Feb 28 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.2-0vl2
  304. - Oops, check /var/lock/atalkd instead of /var/run/atd.pid
  305. (say atd.pid doesn't have anything to do with netatalk!!)
  306. * Tue Feb 26 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.2-0vl1
  307. - updated to new upstream release
  308. * Thu Feb 07 2002 Toru Sagami <sagami@vinelinux.org> 1.5.1.1-0vl3
  309. - install man pages into %%{_mandir}
  310. - PreReq: /sbin/chkconfig /sbin/ldconfig grep textutils
  311. - let pre script exit 0
  312. * Thu Feb 07 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.5.1.1-0vl2
  313. - spec cleanup
  314. - backup old prefs directory (/etc/atalk -> /etc/netatalk/00OLD_VERSION_PREFS)
  315. - restart atalk daemons in the %%post section
  316. * Sun Feb 3 2002 k hanai <hanai@koto.kpu-m.ac.jp>
  317. - v1.5.1.1-0vl1
  318. * Fri Jan 25 2002 k hanai <hanai@koto.kpu-m.ac.jp>
  319. - v1.5.0-0vl1
  320. - release 1.5.0 for sourceforge
  321. * Thu Apr 12 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  322. - v1.5pre6-1rh7
  323. - pre-release 6 for sourceforge
  324. * Wed Mar 07 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  325. - v1.5pre5-1
  326. - pre-release 5 for sourceforge
  327. * Fri Feb 23 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  328. - v1.5pre5-0
  329. - pre-release 5 for sourceforge (prebuild)
  330. * Tue Feb 20 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  331. - v1.5pre4-1
  332. - pre-release 4 for sourceforge
  333. - modified/split mandrake spec for redhat 7 build
  334. * Mon Dec 18 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  335. - v1.5pre3-1mdk
  336. - pre-release 3 for sourceforge
  337. - moved away from 1.4.99 ...
  338. * Wed Nov 08 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  339. - v1.4.99-0.20001108mdk
  340. - pre-release 2 for sourceforge
  341. * Wed Sep 27 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
  342. - v1.4.99-0.20000927mdk
  343. - pre-release 1 for sourceforge