netatalk-vl.spec 15 KB

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